Author |
Message
|
skrlswamy |
Posted: Tue Dec 30, 2003 1:00 pm Post subject: Adding headers to MQMessage |
|
|
 Newbie
Joined: 30 Dec 2003 Posts: 4
|
I'm using IBM MQ using Java API to send the messages. But I need to add string name value pairs to the message header. As my request message is going to be a plain raw xml, some how I need to set the name value pairs in the MQMessage Headers. Is there any way to do this? Please suggest me. _________________ cheers
Swamy S |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 30, 2003 1:38 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Have you looked in the Application Programming Reference for all of the various headers that are available?
Have you looked in the Application Programming Guide for suggestions? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
skrlswamy |
Posted: Tue Dec 30, 2003 1:43 pm Post subject: Adding headers to MQMessage |
|
|
 Newbie
Joined: 30 Dec 2003 Posts: 4
|
I have gone through the entire API, I found something RFH2 header.
But I did not find any code snippet or description about how I can create and attach this header to my payload.
Thanks _________________ cheers
Swamy S |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 30, 2003 3:06 pm Post subject: Re: Adding headers to MQMessage |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
skrlswamy wrote: |
I have gone through the entire API, I found something RFH2 header.
But I did not find any code snippet or description about how I can create and attach this header to my payload.
Thanks |
Well, if you use JMS instead of the standard Java API, JMS will usually attach an RFH2 header, and you can use setProperty (I believe) to populate additional name/value pairs.
I think that there has been sample code for building an RFH2 header with the standard Java API posted to the Java forum here within the last couple of months. If you try searching that, you might find it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
skrlswamy |
Posted: Wed Dec 31, 2003 4:03 pm Post subject: Adding headers to MQMessage |
|
|
 Newbie
Joined: 30 Dec 2003 Posts: 4
|
Sorry... I was not able to find any sample code snippet on RFH2
 _________________ cheers
Swamy S |
|
Back to top |
|
 |
Michael Dag |
Posted: Mon Jan 05, 2004 4:58 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
|