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
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
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
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
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