How to set ReplyToQ while doing a PUT Message. (153 Views)
Reply
Occasional Visitor
reachksuraj
Posts: 1
Registered: ‎05-22-2013
Message 1 of 2 (153 Views)

How to set ReplyToQ while doing a PUT Message.

Hi,


The MQ Application that we intend to test expects the Request message to contain ReplyToQ information in its MQMD header. The Application reads the ReplyToQ value to send back the Response. How is the ReplyToQ value to be set in HP Service Test ?

 

We are using the 'Put and Get Message' option to run the test. As the ReplyToQ value is not set, the GET message returns an error stating 'No message available'.

 

Please advice.

 

Suraj.

Please use plain text.
Occasional Advisor
Ninfea
Posts: 7
Registered: ‎10-30-2013
Message 2 of 2 (94 Views)

Re: How to set ReplyToQ while doing a PUT Message.

Go to Events -> BeforeMQPutMEssage.

Now you have to write your custom code. Add the following namespace:
using IBM.WMQ;

Add the following code inside public void MQPutMessageToQueue6_OnBeforeMQPutMessage (...)
{
args.MQMessage.ReplyToQueueName="YourQueueName";
}
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation