Java

For Java, WebSphere MQ provides access to web services using the Apache Axis Web Services infrastructure. Refer to the Axis documentation for full information on how to use the infrastructure.

Axis supports three programming styles: SOAP style, WSDL style and PROXY style. The key features of these three styles can be summarized as follows:

SOAP style

Assumes that the client knows about the location and signature of the service and does not use a WSDL definition of the service.

WSDL style

Uses WSDL to locate the service, but still relies on the client to know the signature and prepare the parameters accordingly.

Proxy style

Assumes that a proxy to the service has been pregenerated from WSDL. The client calls the service via an instantiation of the proxy object and the service signature is checked at compile-time. This is likely to be the simplest and easiest option.

All three of these styles are supported in the SOAP/WebSphere MQ Java client environment. However, SOAP style offers limited flexibility and ease of use and samples are provided only for WSDL and Proxy styles.

 

WSDL style

Sample mqmtop/tools/soap/samples/java/clients/soap.clients.WsdlClients.java shows an example of a simple Java client WebSphere MQ transport test. This calls an Axis service from an Axis client environment using WSDL Axis calls. The programmer is responsible for referencing the correct WSDL (which can be held locally or accessed over HTTP), and using appropriate ports and bindings.

 

Proxy style

Sample mqmtop/tools/soap/samples/java/clients/soap.clients.SqAxis2Axis.java is an example of a simple Java WebSphere MQ transport test. This calls an Axis service from an Axis client environment using automatically generated proxy classes. The programmer must reference the correct proxies, and the proxies will have been generated to get the remaining information correct.