|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
RFH2 extracting application defined properties |
« View previous topic :: View next topic » |
Author |
Message
|
kjw |
Posted: Thu Oct 09, 2003 1:04 am Post subject: RFH2 extracting application defined properties |
|
|
Newbie
Joined: 09 Oct 2003 Posts: 2
|
Has any one got a code example of extracting application defined properties from the <usr> folder in
a MQRFH2 Header as an incoming JMS Textmessage. Creating and sending them on a response message
using "replyMessage.setStringProperty("AppProperty", "NOT_SET_YET")" works fine. But
"inputMessage.getStringProperty("RpyType")" seems to always result in null. Inspecting incoming
messages on an inbound queue confirms the application defined properties are there.
ie
<usr><ErrorCode>00000000</ErrorCode><RpyType>PPVMessagesResponse</RpyType></usr>
Trawling through the docmentation seems to suggest that it is all possible but there are no explicit examples. Am I missing something obvious here ?
RFH2 Header example :
RFH .......ä.......¸MQSTR .......¸...h<mcd><Type>MZ_IFC1311_OT_PPVMessagesRqt</Type><Set>DS1N4DS0AE001</Set><Fmt>CWF</Fmt><Msd>xml</Msd></mcd>...P<usr><ErrorCode>00000000</ErrorCode><RpyType>PPVMessagesResponse</RpyType></usr><?xml version="1.0" encoding="UTF-8"?><root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ..... |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 09, 2003 9:14 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I just used the mqjmsusr.java and mqjmssel.java from
http://www.developer.ibm.com/tech/sampmq.html
Code: |
if (inMessage instanceof TextMessage) {
System.out.println("Text message");
String myString= ((TextMessage)inMessage).getText();
System.out.println("Text = " + myString);
System.out.println("try this.....");
System.out.println(inMessage.getIntProperty("IntTag2"));
} ....
|
I was able to get the IntTag2 property out of the message. In your example, you use a different property name on the set and get. I'm assuming this is just an example. However, if it is real, this would give you a null. |
|
Back to top |
|
 |
kjw |
Posted: Mon Oct 20, 2003 8:57 am Post subject: Follow Up |
|
|
Newbie
Joined: 09 Oct 2003 Posts: 2
|
The problem in the end boiled down to a WMQI transformation transforming an empty application defined property to <ApplicationProperty/> which
meant the the <usr> folder was not being parsed, in the first place. Hence not being able to access any of the properties in the <usr> folder. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|