The key for successfully doing this is to know your MQ. Rest is all easy. This post will cover the testing of Websphere MQ using web services license on a Windows Controller machine.
Steps:
- Download and install the IBM Websphere MQ client on the Controller machine OR LoadGenerator. Click on Setup.exe and follow the instructions.
- After installation, go to C:\Program Files (x86)\IBM\WebSphere MQ\java\bin provided you chose the default path for install. Edit JMSAdmin.config. The only changes I made in the file are given below for reference.
- INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
- PROVIDER_URL=file:/C:/JNDI
- Now we need to provide all the queue level information you know and create a .scp file. I have created one called myfile.scp. The contents from the file I created is pasted below. Make sure that you check with development team and find the right port, channel name, queue name & queue manager name. Unless you get the right it will not work.
DEFINE QCF(QueueConnectionFactory) QMGR(MYOWNQUEUEMGR) tran(client) chan(PROVIDECHANNELNAME) host(Hostname or IP here) port(1414 or OTHER PORT)
DISPLAY QCF(QueueConnectionFactory)
DEFINE Q(MYOWNQUEUE) QUEUE(MYOWNQUEUE) QMGR(MYOWNQUEUEMGR)
DISPLAY Q(MYOWNQUEUE)
end
- Go to C:\Program Files (x86)\IBM\WebSphere MQ\java\bin & execute the command as shown below
This will create a .bindings file in the C:\JNDI directory. The verbose output of the above command is given below.
- Now we need to make the following run time settings change to our web services vugen script.
- Change JNDI initial context factory to “com.sun.jndi.fscontext.RefFSContextFactory”
- Change JNDI provider URL to “file:/C:/JNDI”
- Change JMS connection factory to “QueueConnectionFactory” and click OK
No comments:
Post a Comment