Author |
Message
|
JacobSteenDue |
Posted: Fri May 20, 2005 12:48 am Post subject: Reading message with complex RFH2 header through JMS fails |
|
|
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 |
|
 |
JacobSteenDue |
Posted: Fri May 20, 2005 1:26 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri May 20, 2005 2:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 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 |
|
 |
JacobSteenDue |
Posted: Sun May 22, 2005 9:13 pm Post subject: |
|
|
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 |
|
 |
kshah |
Posted: Sun Jun 26, 2005 10:10 pm Post subject: Reading nested usr folder message in JMS |
|
|
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><a>....</alist>or somethig like tht...
if nebody has ne other workaround please let me know..
Thanks in advance |
|
Back to top |
|
 |
JacobSteenDue |
Posted: Wed Jun 29, 2005 12:20 am Post subject: |
|
|
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 |
|
 |
|