Call external service from Workflow

A have 2 services (ASP.NET and WCF) on localhost and Workflow project in VS2012. I've add service references of both services and after rubuild I've saw my activities. When I created my workflow and tried to start, I received an error during process: " Could not find endpoint element with name {0} and contract {1} in the ServiceModel client configuration section. " In my app.config file I have this:

<?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: I've found decision.

In the host's application, who used workflow, in app.config file you must add your workflow's app.config. So just copy section "system.serviceModel" from one file to another.

链接地址: http://www.djcxy.com/p/95902.html

上一篇: 使用AppFabric的工作流服务(xamlx)不会持久

下一篇: 从工作流调用外部服务