Using Workflows with Web Service Enhancements 3.0

Windows Workflow Foundation-based Web services are built over the ASP.NET-based ASMX Web service framework. They provide the same amount of extensibility for Web Service Enhancements 3.0 (WSE) as traditional ASMX services. You can configure WSE extensions for a workflow-enabled Web service by doing one of the following:

Extending Web Services for WSE

You can extend Windows Workflow Foundation Web services to support WSE extensions just as you extend ASMX-based Web services for WSE: by modifying the web.config file. For more information, see WSE pipeline configuration in the MSDN library.

Extending the InvokeWebService Activity for WSE

You can consume a Web service from a workflow by using the InvokeWebServiceActivity activity. To extend the InvokeWebServiceActivity activity to support calling a WSE-enabled Web service, you must perform one of the following:

  • Modify the base class of the Web Services Description Language (WSDL) file. The WSDL proxy is generated by using the Visual Studio Add Web Reference feature. You can modify the base class of the proxy that is generated by editing reference.cs, or alternatively, you can register a custom SOAP import type to do it automatically.

  • Configure WSE headers at the client. You can do this by using a configuration file or by using code. For information about how to use a configuration file-based configuration, see the WSE documentation in the MSDN library. Or your code can get access to the WSE proxy type during workflow run time by using the InvokeWebServiceActivity InvokingEvent. The EventArgs of the InvokeWebServiceActivity event carries a proxy instance as one of its properties. It can be typecast to WebServiceClientProtocol to configure WSE headers.

For more information about WSDL and the ASMX Web service framework, see the MSDN library.

See Also

Reference

InvokeWebServiceActivity

Concepts

Using the InvokeWebServiceActivity Activity

Other Resources

Developing ASP.NET Workflow Applications