Interoperating With .NET Web Services

September 25 2009

1 comment. 0
motif

There are use cases where you may want to send a message through HTTP, File, or another transport to a Web Service. Using Mule ESB, it’s fairly straight-forward to accomplish this.

Consider this use case:

  • A client sends an XML message (not SOAP) to Mule, which goes through some transformation and gets forwarded to a .NET-based web service using an SSL certificate.
  • If the client queries for the WSDL, a specialized component in Mule called WSProxyService returns the WSDL, which is retrieved from the .NET web service.
  • To the client, http://localhost:8888/services/myservice exposes a standard web service, and the client doesn’t have to know what this service is implemented by, e.g., whether it’s Axis2, .NET, or CXF.
  • In some cases, a SOAP action header may need to be added to the message so that .NET can find the right service on the .NET side.

Here’s how you configure this in the Mule configuration file:

Declaring a secure HTTP connector, endpoint, and transformers:

Defining a Mule service:

That’s all there is to it. Happy interop’ing!


We'd love to hear your opinion on this post


One Response to “Interoperating With .NET Web Services”

  1. Thanks for the example. How would we configure this code for NTLM authentication? Most .Net web services are protected by NTLM.

    Any ideas?