IBM MQ transport for SOAP web service clients
We can reuse an existing SOAP over HTTP client with IBM MQ transport for SOAP. You must make some small modifications to the code and build process to convert the client to work with IBM MQ transport for SOAP.
Coding
JAX-RPC clients must be written in Java™. .NET Framework 1 and 2 clients can be written in any language that uses the Common Language Runtime. Code examples are provided in C# and Visual Basic.
The level of transactional support depends on the client environment and the pattern of the SOAP interaction. The SOAP request and SOAP reply can not be part of the same atomic transaction.
You must call IBM.WMQSOAP.Register.Extension() in a .NET Framework 1, .NET Framework 2 client. In a JAX-RPC Java web service client call com.ibm.mq.soap.Register.extension to register the IBM MQ SOAP sender. The method registers the IBM MQ transport for SOAP sender as the handler for SOAP messages using the jms: protocol.
To create a .NET Framework 3 client, generate a Windows Communication Foundation client proxy using the svcutil tool; see Generating a WCF client proxy and application configuration files using the svcutil tool with metadata from a running service.
Libraries required to build and run .NET Framework 1 and 2 clients
- amqsoap
- System
- System.Web.Services
- System.Xml
Libraries required to build and run Axis 1.4 clients
- MQ_Install\java\lib\com.ibm.mq.soap.jar;
- MQ_Install\java\lib\com.ibm.mq.commonservices.jar;
- MQ_Install\java\lib\soap\axis.jar;
- MQ_Install\java\lib\soap\jaxrpc.jar
- MQ_Install\java\lib\soap\saaj.jar;
- MQ_Install\java\lib\soap\commons-logging-1.0.4.jar;
- MQ_Install\java\lib\soap\commons-discovery-0.2.jar;
- MQ_Install\java\lib\soap\wsdl4j-1.5.1.jar;
- MQ_Install\java\jre\lib\xml.jar;
- MQ_Install\java\lib\soap\servlet.jar;
- MQ_Install\java\lib\com.ibm.mq.jar;
- MQ_Install\java\lib\com.ibm.mq.headers.jar;
- MQ_Install\java\lib\com.ibm.mq.pcf.jar;
- MQ_Install\java\lib\com.ibm.mq.jmqi.jar;
Register SOAP extension
Client examples
Figure 1 is an example of a .NET Framework 1 or .NET Framework 2 C# client that uses the inline programming model. The IBM.WMQSOAP.Register.Extension() method registers the IBM MQ SOAP sender with .NET as the jms: protocol handler.
Figure 2 is an example of a Java client that uses the JAX-RPC static proxy client interface. The com.ibm.mq.soap.Register.extension(); method registers the IBM MQ SOAP sender with the service proxy to handle the jms: protocol.