Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading javax.jms.Message as a string

843830Feb 9 2005 — edited Feb 11 2005
Hi All,

I have an MDB configured to listed on an MQ that receives xml messages in text format.
I need to get the text message out of the javax.jms.Message object to process the information.
When I put a message in the queue and do a toString of the Message object, I get the following:

JMS Message class: jms_bytes
JMSType: null
JMSDeliveryMode: 1
JMSExpiration: 0
JMSPriority: 0
JMSMessageID: ID:414d512053544c44563030352020202041e71d9a22d41e04
JMSTimestamp: 1107998880320
JMSCorrelationID:null
JMSDestination: null
JMSReplyTo: null
JMSRedelivered: false
JMSXDeliveryCount:1
JMS_IBM_MsgType:8
JMSXAppID:
JMS_IBM_Format:
JMS_IBM_Encoding:273
JMS_IBM_PutApplType:28
JMS_IBM_Character_Set:37
JMSXUserID:mqwms
JMS_IBM_PutTime:01280032
JMS_IBM_PutDate:20050210
Integer encoding: 1, Floating point encoding 256
a385a2a3409485a2a2818785

I tried casting the object to TextMessage but it doesn't work. It successfully gets casted to BytesMessage, but when I try to read the message byte by byte and converting it to a string, it is forming some weird message.

Any help? Please note that I am using J2EE 1.3
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2005
Added on Feb 9 2005
1 comment
698 views