Using the deployment utility

Run the deployment utility using the amqwdeployWMQService command. Use the -f flag to specify the name of the source file. For Axis services this is the Java source file, and for .NET services, the .asmx file. The following example illustrates the use of anqwdeployWMQService for Axis

amqwdeployWMQService -f javaDemos/service/StockQuoteAxis.java

The following example illustrates the use of anqwdeployWMQService for .NET.

amqwdeployWMQService -f StockQuoteDotNet.asmx

Deployment performs the following actions. Most of the results of these actions are placed in the

generated subdirectory of the directory from which the deployment is made, which is created if it does not already exist. If you are redeploying a service that has already been deployed, you should first delete the

generated subdirectory. In the following examples amqwdeployWMQService is running from c:/temp/soap, so output is placed in c:/temp/soap/generated.

  1. For Java services, compile the source into the c:/temp/soap/generated/server subdirectory, for example:

    c:/temp/soap/generated/server/javaDemos/service/StockQuoteAxis.class
    .NET services that are not written using code embedded in the .ASMX file must be compiled before calling anqwdeployWMQService.

  2. Generate the appropriate WSDL. This is created in c:/temp/soap/generated/className_Wmq.wsdl, for example

    c:/temp/soap/generated/javaDemos.service.StockQuoteAxis_Wmq.wsdl 

  3. For Java services, prepare deployment descriptor files (className_deploy.wsdd and className_undeploy.wsdd), for example:

    c:/temp/soap/generated/server/javaDemos/service/StockQuoteAxis_deploy.wsdd 
    and

    c:/temp/soap/generated/server/javaDemos/service/StockQuoteAxis_undeploy.wsdd
    and deploy into the execution directory to create or update c:/temp/soap/generated/server-config.wsdd.

  4. Generate the appropriate proxies for Java, C# and Visual Basic from this WSDL. On Windows, proxies are generated for all three client languages regardless of the language in which the service is written. The C# and VB proxies are placed directly into the c:/temp/soap/generated directory. The Java proxies are placed in the ./remote subdirectory of the original package and file directories to prevent confusion with the original classes. For example, the .Net proxies might be placed in:

    c:/temp/soap/generated/client/StockQuoteAxisService.cs 
    and

    c:/temp/soap/generated/client/StockQuoteAxisService.vb
    and the various Java files might be placed in:

    c:/temp/soap/generated/client/javaDemos/service/remote/*.java

  5. Compile the Java proxies: for example to

    c:/temp/soap/generated/client/javaDemos/service/remote/*.class

  6. Create a WebSphere MQ queue to hold requests to the service. The queue name is of the form SOAPJ.directory, for example: SOAPJ.demos.

  7. Prepare a file to start the SOAP/WebSphere MQ listener that will process this queue, for example

    c:/temp/soap/generated/server/startWmqJListener.cmd 

  8. If the -tmq option has been used, then prepare WebSphere MQ definitions that will permit the SOAP/WebSphere MQ listener process to be automatically triggered. for example:

    WebSphere MQ Process: SOAPJ.demos WMQ

    Trigger Initiation Queue: SYSTEM.SOAP.INIT.QUEUE

The WSDL and the proxies generated from it will include the appropriate URI to call the service, for example:

jms:/queue?destination=myQ&connectionFactory=()&targetService=myService
&initialContextFactory=com.ibm.mq.jms.Nojndi

 

Errors

On Windows, if errors are reported from amqswsdl, try issuing the following command:

%windir%/Microsoft.NET/Framework/version number/aspnet_regiis.exe -ir

This generally applies to systems where IIS has not been installed or IIS has been installed after NET. (For more information about installing IIS and .NET, and registering IIS, see Prerequisites.) The aspnet_regiis utility sets up the necessary registry keys to allow Windows to execute files with the .asmx extension as services. This is normally first encountered when amqswsdl generates the wsdl files at deploy time. If you use a customized deployment procedure that does not include this step, the registry keys are still required to permit the listener to invoke the services.