|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Native MQ to JMS (MQRFH2) |
« View previous topic :: View next topic » |
Author |
Message
|
teal |
Posted: Wed Jan 26, 2005 6:10 pm Post subject: Native MQ to JMS (MQRFH2) |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
I seem to be getting mixed answers on this so I figured I would try as hard as possible to word this corrrectly.
When sending a MQ 5.3 Message with (RFH2 header)
from an as400(ebcdic)
to a windows server running WAS(JMS) ascii
Does the RFH2 header come across in ebcic also along with the actual message?
I thought if the MQMD has MQRFH2 in the format field MQseries treats this RFH2 header as it would MQMD meaning it puts them in a 'readable Stringlike' format on any platform.
/****************************************/
Do you need to make the RFH2 in unicode?
Do you need to change the MQMD CCSID to 437 and Encoding to 546 and set the CCSIC AND chanfe the RFH2 CCSID to 37, Encoding 0?
/*****************************************/
How can I make the RFH2 readable by the MDB so it can grab some <usr> data but pass the actual message(still in ebcdic) along. |
|
Back to top |
|
 |
slaupster |
Posted: Thu Jan 27, 2005 1:47 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2004 Posts: 41
|
Unfortunately, the answer to the charset and encoding question is not simple, but it is addressed at the following URL quite well:
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.etools.mft.doc/aq06930_.htm
The RFH2 is not directly available to JMS, but there is a well documented conversion from MQ Messages to JMS Messages in the Using Java book. The <usr> folder is used to store user defined properties. So if you populate the <usr> folder correctly then you should simply be able to use the Message.getxxxProperty(String name) methods to get at it. I've never seen this done and would be interested to know if you manage it! |
|
Back to top |
|
 |
teal |
Posted: Thu Jan 27, 2005 11:05 am Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
Thanks for your response.
I only need a few fields that I have created in the <usr> folder of the RFH2 header i really dont care if the real message is ebcdic or not but when the message is coming across, even the rfh2 is in ebcdic.
I tried making the rfh2 in unicode, and it now sees the rfh2, stangely enough 2 of the fields I get the correct data, the othe two are in ebcdic even thought the <SID> tag was readable..
also the mdb saw it as a text message instead of the bytes message I wanted.
this just doesnt seem right,
It seems like the RFH2 would get treated much like the MQMD and could easily be dumped..
In a nutshell.
The way this is normally handled is that the MDB must manually spearate the MQRFH2 header from the actual message and translate both from ebcdic to ascii?
thx again
Last edited by teal on Tue Mar 01, 2005 3:34 pm; edited 1 time in total |
|
Back to top |
|
 |
slaupster |
Posted: Fri Jan 28, 2005 5:15 am Post subject: |
|
|
Apprentice
Joined: 17 Nov 2004 Posts: 41
|
The programming reference states that the char set of the MQRFH2 should be the same as those in the MQMD, or the preceeding header, which I imagine is the MD anyway. So I wouldn't try and write them as UTF.
I'm not entirely sure in this case if any conversion is done automatically on the MQRFH2 over the channel as it would be in the MD, but given that it sounds like the message data is char data anyway, why not have all the conversion take place on the channel at the sending QMGR - see Application data conversion in chapter 3 of the application programming guide. This way your apps need not worry, and in addition, data in the <usr> folder will also be converted according to the ccsid in the RFH2.
Quote: |
When a WebSphere MQ message is received with an Msd domain other than one
of the standard jms_xxxx values, it is instantiated as a JMS text or bytes message
and a URI-style JMSType is assigned to it. If the format field of the RFH2 is
MQFMT_STRING, it becomes a TextMessage; otherwise it becomes a
BytesMessage. The receiving application can read this using the getJMSType
method. |
I think the above (quote from Using Java) could be happening to you:
Msd values:
jms_none
jms_text
jms_bytes
jms_map
jms_stream
jms_object
- make sure its one of these.
I hate ccsid problems! |
|
Back to top |
|
 |
EddieA |
Posted: Fri Jan 28, 2005 10:03 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
The programming reference states that the char set of the MQRFH2 should be the same as those in the MQMD, or the preceeding header |
I didn't think it had to be the same. The CCSID and Encoding in the MD describe the char set of the next piece of data, which might be an RFH2, or it might be the payload. If it is an RFH2, then the CCSID and Encoding in that header describe the next piece of data, ad infinitum.
The only oddity about the RFH2 header, is that the Name/Value pairs can only be certain Character sets, which may be different from the rest of the RFH2, and hence, have their own CCSID field.
Quote: |
I'm not entirely sure in this case if any conversion is done automatically on the MQRFH2 over the channel as it would be in the MD |
My understanding is, unless you are using Channel Conversion, that only the MD is converted.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|