Call a WCF service from a workflow

Generally, we add a service reference(generate client activity in a workflow project) or generate proxy class then call it in a custom activity to call a WCF service from a workflow.

If we try to call the service directly via message activity, we need to wrap the input and output of the service operation:

http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/b948da44-a0de-4c7c-940d-18cbf55be793

We can check the generated activity to see how the input and output of the service operation were wraped. Besides, we can capture the meesages when we send requests to the service in both ways. We'll notice their envelops have no difference, but the message bodies are different.

用Fiddler捕獲本地發出的消息的時候,可以用IPV4.Fiddler或在locahost後面加一個點,以此來代替localhost,這樣Fiddler就可以捕獲到本地的消息了。

posted @ 2012-06-25 18:11  Leo Tang  阅读(206)  评论(0)    收藏  举报