Using the InvokeWebServiceActivity Activity

The InvokeWebServiceActivity activity invokes a Web service through a proxy class, passing and receiving specified parameters.

To invoke a Web service method from a workflow, configure the following InvokeWebServiceActivity properties:

  • Specify the proxy class used to invoke the Web service by using the ProxyClass property. The ProxyClass property lists the possible Web service proxy classes derived from SoapHttpClientProtocol accessible from the workflow project.

    Note

    The proxy is generated from the Web Services Description Language (WSDL) file. For more information about WSDL, see the MSDN Library.

  • Specify the name of the Web service method that you want to invoke with the MethodName property.

Note

If you do not specify a session ID for an InvokeWebServiceActivity activity, in which case the SessionId property is null or String.Empty, a new proxy instance is created every time the activity executes. This is true whether you are invoking one Web service after another, or invoking a Web service within a loop, as in a WhileActivity activity. The SessionId property is an index to the session cookies for the Web services from within the workflow. If the workflow will be issuing subsequent calls to the same Web service using different InvokeWebServiceActivity activities and those calls are intended to be within the same session, the value of this property is set to be the same for those multiple InvokeWebServiceActivity activities.

For more information, see the InvokeWebServiceActivity class of the System.Workflow.Activities namespace in the Windows Workflow Foundation Class Library reference.

For a code sample that demonstrates how to use the InvokeWebServiceActivity activity, see Web Service Sample.

See Also

Reference

InvokeWebServiceActivity
WebServiceInputActivity
WebServiceOutputActivity
ProxyClass
MethodName

Concepts

Using the WebServiceInputActivity Activity
Using the WebServiceOutputActivity Activity
Invoking Web Services from a Workflow
Communicating with Other Workflows

Other Resources

Web Service Sample
Windows Workflow Foundation Activities