Developing web services for IBM MQ transport for SOAP
Use your normal web service development environment to develop services for use with the IBM MQ transport for SOAP.
Before you begin
- If you are planning to use the command-line tools supplied with IBM MQ transport for SOAP:
- Create a deployment directory for the service.
- Start a command window in the directory.
- For .NET, csc.exe and wsdl.exe must be in the path, and be from the same version of .NET Framework.
- For Java™,
- Run the amqwsetcp command to set up the classpath.
- An IBM JRE and a JDK at the same version level must be in the current path. The version level must be at least 5.0.
- Customize the classpath to include the locations of any additional .jar libraries, and directories containing .java packages, including for the service you are developing. Put the current directory
.in the classpath.- Create a directory, relative to the current directory of the command window, corresponding to the package name of the service you are developing.
- Alternatively, use workbench tools that support web services development. The example development tasks use Microsoft Visual Studio 2008, Eclipse IDE for Java EE Developers and WebSphere Application Server Community Edition.
Existing web services need no modification to work with WebSphere transport for SOAP. The tools supplied with IBM MQ transport for SOAP deploy a web service, and run it using an IBM MQ SOAP listener. The tools also generate WSDL, .NET client stubs, and .java proxy classes to develop IBM MQ transport for SOAP clients.
Follow these steps to create a service, and prepare it for deployment and the generation of clients. Follow the steps in the related tasks to create a service using Eclipse or Microsoft Visual Studio 2008.
Procedure
- Develop the service using your normal development environment.
- Test the service using an HTTP web services client
- Follow these steps to prepare the deployment directory:
- For Java
- Copy the .java file defining the service interface into the deployment directory.
- Copy any .class files for the service into the directory corresponding to the package name.
- Check that the classpath can locate all the classes that are required: compile the service .java file using javac.
- For .NET
- Copy the .asmx file defining the service into the deployment directory, and
- If you are using the code-behind model, copy any .dll files into a deployment directory\bin directory.