I have queue name, host name, port, channel, queue manager, Get and Put option details of IBM WebSphere MQ queue.
Is it possible to send a message to the queue with the above details? If anyone has an idea, please provide some hints.
If you have a proper install of WMQ then you will have the samples. These will be in the installation directory for your platform as described here. I would direct you to the SimpleRequestor.java
code which hard-codes these values. You can alternatively get them from Java properties files, the command line or a JNDI call.
// Set the properties
cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, "localhost");
cf.setIntProperty(WMQConstants.WMQ_PORT, 1414);
cf.setStringProperty(WMQConstants.WMQ_CHANNEL, "SYSTEM.DEF.SVRCONN");
cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, "QM1");
Other methods of making the connection are illustrated in the other samples. Look around the directory and one of the programs will have the connection method that you need.
If you do not have the samples, they are distributed with the MQ Client install. For v7 client, this is SupportPac MQC7. Other versions are distributed in their corresponding SuppportPac which you can find from the landing page. Be sure to refer to the Infocenter that corresponds to the version of WMQ client that you are using. Since v6 is end-of-life as of September 2012, hopefully you are already using v7.0 or v7.1 client and your QMgr will also be at one of these versions.
Try the IBM supportpac RFHUtil for development and testing of WebSphere MQ and IBM Integration Bus (IIB) or WebSphere Message Broker (WMB) applications