WCF client to an Axis Java service hosted by IBM MQ sample
Sample client applications and sample service proxy applications are supplied for both Java and .NET. The samples are based on a Stock Quote service that takes a request for a stock quote and then provides the stock quote.
Before you begin
When the .NET SOAP over JMS service hosting environment is correctly installed and configured in IBM MQ and is accessible from a local queue manager, additional configuration steps must be completed.
- Set the WMQSOAP_HOME environment variable to the IBM MQ installation directory, for example: C:\Program Files\IBM\MQ
- Ensure that the Java compiler javac is available and on the PATH.
- Copy the file axis.jar from the prereqs/axis directory of the WebSphere® installation CD to the IBM MQ installation directory.
- Add to the PATH:
MQ_INSTALLATION_PATH
\Java\lib whereMQ_INSTALLATION_PATH
represents the directory where IBM MQ is installed, for example: C:\Program Files\IBM\MQ - Ensure that the location of .NET is specified correctly in
MQ_INSTALLATION_PATH
\bin\amqwcallWSDL.cmd whereMQ_INSTALLATION_PATH
represents the directory where IBM MQ is installed, for example: C:\Program Files\IBM\MQ. The location of .NET can be specified for example:set msfwdir=%ProgramFiles%\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
- Navigate to your SOAP over JMS working directory.
- Enter one of the following commands to run the verification test
and leave the service listener running:
- For .NET:
MQ_INSTALLATION_PATH
\Tools\soap\samples\runivt dotnet holdMQ_INSTALLATION_PATH
represents the directory where IBM MQ is installed. - For AXIS:
MQ_INSTALLATION_PATH
\Tools\soap\samples\runivt Dotnet2AxisClient holdMQ_INSTALLATION_PATH
represents the directory where IBM MQ is installed.
- For .NET:
hold
argument keeps the listeners running
after the test completes.
- Delete the generated SOAP over JMS directory.
- Delete the queue manager.
About this task
The client has been generated by using WSDL to generate client files as described in Generating a WCF client proxy and application configuration files using the svcutil tool with WSDL
The sample has been configured with specific resource names as described in this paragraph. If you need to change the resource names, then you must also change the corresponding value on the client application in the MQ_INSTALLATION_PATH
\tools\wcf\samples\WMQAxis\default\client\app.config file, and on the service application in the MQ_INSTALLATION_PATH
\tools\wcf\samples\WMQAxis\default\service\WmqDefaultSample_StockQuoteDotNet.wsdl file, where MQ_INSTALLATION_PATH
represents the installation directory for IBM MQ.
Procedure
MQ_INSTALLATION_PATH
\tools\wcf\samples\WMQAxis\default\client\bin\Release\TestClient.exe file, where MQ_INSTALLATION_PATH
represents the installation directory for IBM MQ.
Results
Hello World
five times to a file in the current directory.