我不能为我的生活工作。我有工作流程服务,因此声明:
<WorkflowService mc:Ignorable="sap sap2010 sads" p1:TextExpression.Namespaces="{x:Reference __ReferenceID79}" p1:TextExpression.References="{x:Reference __ReferenceID80}" ConfigurationName="MyWorkflowService" sap2010:ExpressionActivityEditor.ExpressionActivityEditor="C#" sap2010:WorkflowViewState.IdRef="WorkflowService_1" Name="MyWorkflowService"
它实现了服务合同:
<WorkflowService.ImplementedContracts>
<x:Type Type="ns:IWorkflowService" />
</WorkflowService.ImplementedContracts>
我尝试启用工作流程控制端点,以便我可以从远程客户端恢复暂停的工作流程。所以我已将以下部分添加到web.config中:
<services>
<service name="MyWorkflowService">
<endpoint binding="basicHttpBinding" name="BasicHttpBinding_IWorkflowService" contract="Name.Space.IWorkflowService" />
<endpoint binding="basicHttpBinding" name="wceEndpoint" address="wce" kind="workflowControlEndpoint" contract="System.ServiceModel.Activities.IWorkflowInstanceManagement" />
</service>
</services>
但每次访问http://myhost.lan/service/MyWorkflowService.xamlx时,我都会收到此消息:
合同名称&#39; Name.Space.IWorkflowService&#39; 无法在服务实施的合同列表中找到 &#39; MyWorkflowService&#39;
我的合同如下:
[ServiceContract(Name = "IService", Namespace = "http://mycompany/myservice/")]
public interface IWorkflowService
{
[OperationContract]
int DoStuff(string filePath);
[OperationContract]
[FaultContract(typeof(ThingNotFoundException))]
void Take(string baseDirectory, int id);
}
非常感谢任何帮助!
答案 0 :(得分:0)
Reflector向我透露了答案。我在配置中使用了错误的合同。
我应该一直在使用:
<endpoint binding="basicHttpBinding" name="BasicHttpBinding_IWorkflowService" contract="IService" />
我曾尝试过
http://mycompany/myservice/IService
但不是
IService
本身。