views:

316

answers:

2

Hi ,

I want to call a web service in Windows Workflow project using InvokeWebServiceActivity.

I want to call this activity in such a manner that if the web service call fails it should get logged and in the catch block i can write some custom code.

Now when the web service fails, which is on different VPN, my workflow breaks ..

Any Ideas..

+1  A: 

Try adding a FaultHandler activity. There is a container for all fault handlers you add. Each handler is bound to a workflow that executes as soon as the exception is caught. After adding the FaultHandler activity you define the type of the exception to catch.

Nescio
Can you provide an example for how to user FaultHandlerActivity for catching exception from InvokeWebServiceActivity?
ksa
+1  A: 

To catch the exception from webservice using FaultHandlerActivity, wrap the InvokeWebserviceActivity inside sequence activity, then use faulthandleractivity to catch exceptions.

ksa