Deploying a service to .NET Framework 1 or 2 service to use IBM MQ transport for SOAP

Deploy a .NET Framework 1 or 2 service to IBM MQ transport for SOAP. Create a deployment directory, run the amqwdeployWMQService command, and start the .NET listener.


Before you begin

  1. Follow the instructions for installing IBM MQ transport for SOAP
  2. Verify the installation and your environment using the runivt command.
  3. The path to the .NET framework files wsdl.exe and csc.exe must be set. The copies of wsdl.exe and csc.exe identified by the PATH variable must be at the same level of the .NET framework. If we have multiple .NET frameworks installed, or are using Visual Studio, check the PATH variable carefully.
  4. To redeploy a service:
    1. Delete the ./generated subdirectory, and all its subdirectories
    2. Remove requests from the destination queue and delete it.
    3. Proceed with the instructions from step 2.


About this task

These instructions are to deploy a .NET service for the first time. To restart a .NET service, rerun the .NET SOAP listener, step 9.

Use the following instructions to deploy a new .NET Framework 1 or .NET Framework 2 service to IBM MQ transport for SOAP:


Procedure

  1. Create a directory deployDir to hold the deployment files. The deployment utility requires that each service is deployed from a separate directory.
  2. Open a command window in deployDir to run amqwdeployWMQService.
    C:\IBM\ID\QuoteClient>
    
  3. Run amqwsetcp to set the classpath. A classpath is needed only for Axis clients.
  4. Copy the .NET service, className.asmx, into deployDir
  5. Build the service implementation into a library ( .dll ).

    The inline service implementation is in className.asmx. The code-behind service implementation might be className.asmx.cs.

    Figure 1 shows an example of a command to build a .NET Framework V2 service as a library.

    Figure 1. Build command for .NET Framework V2 service
    c:\WINDOWS\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702
    /errorreport:prompt /warn:4 /define:TRACE
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll
    /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
    /debug:pdbonly /filealign:512 /optimize+
    /out:obj\Quote.dll /target:library Properties\AssemblyInfo.cs Quote.asmx.cs
    
  6. Copy className.dll into deployDir\bin.
  7. Set up the IBM MQ resources, and create the listener required for the service:
    amqwdeployWMQService -f className.asmx -c genAsmxWMQBits
    -v -u  "jms:/queue?destination=queueName
    &initialContextFactory=com.ibm.mq.jms.Nojndi
    &connectionFactory=(connectQueueManager(QmgrName)binding(auto))
    &targetService=className.asmx"
    
  8. If you need to generate the WSDL for the service, generate client stubs, or client proxies, run amqwdeployWMQService with one of the following parameters:

    • genAsmxWsdl
    • genAxisWsdl
    • genProxiesToDotNet
    • genProxiestoAxis
    Note: You must generate WSDL before generating the proxies.
  9. Start the generated .NET listener.
    .\generated\server\startWMQNListener.cmd