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 » Reading message with complex RFH2 header through JMS fails

Post new topic  Reply to topic
 Reading message with complex RFH2 header through JMS fails « View previous topic :: View next topic » 
Author Message
JacobSteenDue
PostPosted: Fri May 20, 2005 12:48 am    Post subject: Reading message with complex RFH2 header through JMS fails Reply with quote

Novice

Joined: 22 Mar 2005
Posts: 13

I'm trying to read a message from a MQ queue using JMS. The program for doing this is quite simple and therefore I havn't posted it (it's pratically straight out of the 'Using Java' guide).

All is apparently working OK - I can read the message as a TestMessage and view the contents as well as the RFH2 header. But only if the RFH2 header is simple - like "<A>valA</A><B>valB</B>"

Once I start using a more complex header - lige <aList><A>val_1</A><A>val_2</A></aList> the receive method fails with the following exception:

An JMSException ocurred: MQJMS1050: The MQRFH2 header has an incorrect format, linkedException=javax.jms.MessageFormatException: MQJMS1050: The MQRFH2 header has an incorrect format
javax.jms.MessageFormatException: MQJMS1050: The MQRFH2 header has an incorrect format
at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:5011)
at com.ibm.jms.JMSMessage._parseUsrFolder(JMSMessage.java:3498)
at com.ibm.mq.jms.MQJMSMessage.createJMSMessage(MQJMSMessage.java:507)
at com.ibm.mq.jms.MQMessageConsumer.getMessageQ(MQMessageConsumer.java:1740)
at com.ibm.mq.jms.MQMessageConsumer.getMessage(MQMessageConsumer.java:4313)
at com.ibm.mq.jms.MQMessageConsumer.receiveInternalQ(MQMessageConsumer.java:2407)
at com.ibm.mq.jms.MQMessageConsumer.receiveNoWaitQ(MQMessageConsumer.java:2203)
at com.ibm.mq.jms.MQMessageConsumer.receiveNoWait(MQMessageConsumer.java:4274)
at MessageSender.run(MessageSender.java:53)
at MessageSender.main(MessageSender.java:103)

But surely there is nothing wrong with the RFH2 header - it is displayed correctly in the message when reading through rfhutil and I can read and manipulate it in WBIMB. So what's going on here - can I really be the first person to use a list in the RFH2 header of a text message (surely not).
_________________
Jacob Steen Due
Chief Consultant
IBM Certified Solution Designer - WebSphere MQ V5.3
IBM Certified Solution Designer - WebSphere Business Integration Message Broker V5
Back to top
View user's profile Send private message Visit poster's website
JacobSteenDue
PostPosted: Fri May 20, 2005 1:26 am    Post subject: Reply with quote

Novice

Joined: 22 Mar 2005
Posts: 13

Just a folloup - I'm using MQ 5.3 CDS09
_________________
Jacob Steen Due
Chief Consultant
IBM Certified Solution Designer - WebSphere MQ V5.3
IBM Certified Solution Designer - WebSphere Business Integration Message Broker V5
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Fri May 20, 2005 2:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Your RFH2 was not formed with JMS. There is no nesting allowed.
so
Quote:
<aList><A>val_1</A><A>val_2</A></aList>
is illegal

Read the documentation !! Using java ..

Enjoy
Back to top
View user's profile Send private message Send e-mail
JacobSteenDue
PostPosted: Sun May 22, 2005 9:13 pm    Post subject: Reply with quote

Novice

Joined: 22 Mar 2005
Posts: 13

I stand corrected - didn't see that in the documentation Better go look again......
_________________
Jacob Steen Due
Chief Consultant
IBM Certified Solution Designer - WebSphere MQ V5.3
IBM Certified Solution Designer - WebSphere Business Integration Message Broker V5
Back to top
View user's profile Send private message Visit poster's website
kshah
PostPosted: Sun Jun 26, 2005 10:10 pm    Post subject: Reading nested usr folder message in JMS Reply with quote

Novice

Joined: 13 Jun 2005
Posts: 23

I also same issue of reading a nested structure like <alist><a>123</a><alist> from usr folder

I know reading nested structure through JMS is not possible...but i would like to know if ne workaround...possibles??

like can we have something like
<alist>&lta&gt....</alist>or somethig like tht...

if nebody has ne other workaround please let me know..
Thanks in advance
Back to top
View user's profile Send private message
JacobSteenDue
PostPosted: Wed Jun 29, 2005 12:20 am    Post subject: Reply with quote

Novice

Joined: 22 Mar 2005
Posts: 13

Please see my reply in the other tread started on this subject
_________________
Jacob Steen Due
Chief Consultant
IBM Certified Solution Designer - WebSphere MQ V5.3
IBM Certified Solution Designer - WebSphere Business Integration Message Broker V5
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Reading message with complex RFH2 header through JMS fails
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.