从Workflow调用外部服务

时间:2013-12-25 15:58:39

标签: .net wcf soap workflow-foundation-4

在VS2012中的localhost和Workflow项目上有2个服务(ASP.NET和WCF)。 我添加了两种服务的服务引用,并在rubuild之后我看到了我的活动。当我创建我的工作流并尝试启动时,我在进程中收到错误: “无法在ServiceModel客户端配置部分找到名称为{0}且合同为{1}的端点元素。” 在我的app.config文件中,我有这个:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IGetCoefficientsService" />
                <binding name="Service1Soap" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost/L4/GetCoefficientsService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGetCoefficientsService"
                contract="IGetCoefficientsService" name="BasicHttpBinding_IGetCoefficientsService" />
            <endpoint address="http://localhost/L3/Service1.asmx" binding="basicHttpBinding"
                bindingConfiguration="Service1Soap" contract="Service1Soap"
                name="Service1Soap" />
        </client>
    </system.serviceModel>
</configuration>

UPD: 我找到了决定。

在使用工作流程的主机应用程序中,在app.config文件中,您必须添加工作流程的app.config。 所以只需将“system.serviceModel”部分从一个文件复制到另一个文件。

0 个答案:

没有答案
相关问题