Pergunta

I have a WCF Workflow Service (xamlx) in which code activities are called by a flowchart.

I added a service reference to a WCF Service I need to call. But the client for this WCF service is not visible from the code activity I need to use it in.

Instead the client appears in the toolbox so I can only use it in a workflow.

However I want to be able to use it in code like this:

ServiceClient proxy = new ServiceClient();
proxy.MyMethod();
Foi útil?

Solução

Doing the same thing now, this got me stuck also. In the WCF Workflow Services project, use the Add service Reference specifying the address of the service you want to call.

When you rebuild the WCF Workflow Services project you should see activities create for the service methods.

Place the activities on the designer and configure the parameters.

Here are some related links:

http://blogs.msdn.com/b/endpoint/archive/2010/12/08/how-to-consume-a-wcf-service-from-a-wf4-workflow.aspx

http://www.cloudcasts.net/ViewWebcast.aspx?webcastid=2521458133038050447

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top