ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » RFH2 extracting application defined properties

Post new topic  Reply to topic
 RFH2 extracting application defined properties « View previous topic :: View next topic » 
Author Message
kjw
PostPosted: Thu Oct 09, 2003 1:04 am    Post subject: RFH2 extracting application defined properties Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Thu Oct 09, 2003 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kjw
PostPosted: Mon Oct 20, 2003 8:57 am    Post subject: Follow Up Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » RFH2 extracting application defined properties
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.