|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Trouble with MA0R and CCSID |
« View previous topic :: View next topic » |
Author |
Message
|
ivogd |
Posted: Tue Jan 04, 2005 1:29 am Post subject: Trouble with MA0R and CCSID |
|
|
Newbie
Joined: 04 Jan 2005 Posts: 2
|
Hi,
Not sure if this is the right thread or the question has already been asked (although I searched the archives)...
I have a SOAP client (written in C#) using IBM's MA0R SupportPack talking to a WS residing on a different platform (NSK). The SOAP request is UTF-8 encoded (request message has CCSID 1208 and Encoding 546). The server replies with content encoded in UTF-8 too and I can vary the CCSID and the Encoding of the message. The format is MQSTR (although I could change that too if necessary). The first QMGR (on WIN32) has a default CCSID of 437. The remote QMGR (where the WS is implemented) has a CCSID of 819. It all works fine until I throw in the message some non-Latin data (Cyrillic in my case). From what I can tell, the message makes it fine back to the client, but when the client reads it off the queue, it does some character conversion and that's where the Cyrillic content gets garbled. (The Latin payload is OK - and that's no surprize, the code points in UTF-8 and ISO-8859-1 are the same).
MA0R is officially unsupported, so there's not too much info what it does internally. I suspect that it gets messages with MQGMO_CONVERT. On that assumption, I tried to set CCSID in the response message to 437 to avoid the character conversion, but that didn't work. I also thought that 1208 would be a good candidate since the content is after all UTF-8 encoded - no luck either. (Yes, the default 819 is no good either).
A quick test reveals that if I get the message w/o MQGMO_CONVERT, the UTF-8 payload is intact, but unfortunately MA0R does not allow me to control this behavior (or at least I don't know how)...
Anyone had the same (similar) problem? Anyone knowledgeable about MA0R... or I'm simply missing MQ basics here?
Thanks in advance.
Ivo |
|
Back to top |
|
 |
ivogd |
Posted: Wed Jan 05, 2005 12:35 am Post subject: |
|
|
Newbie
Joined: 04 Jan 2005 Posts: 2
|
While waiting for comments/ideas, I was able to find out what was causing the problem... read below if interested (it’s somewhat lengthy).
It appears that MA0R gets messages from the response queue w/o specifying MQGMO_CONVERT (my original assumption was wrong). I was able to track down the execution from the MQSOAP assembly through the amqmdnet assembly (the MQ classes for .NET) and finally to the .NET class, which was responsible for reading the data in: an instance of System.IO.BinaryReader. The MSDN documentation describes the BinaryReader class as one reading UTF-8 encoded data (but could be configured for other encodings as well).
At this point I was perplexed: I thought that the response message should have SSCID of 1208 (UTF- , but that didn't help. I suspected that MA0R had a bug, but I could not find anything wrong in the .NET assemblies.
Back to MSDN: "UTF-8 encodes Unicode characters with a variable number of bytes per character. This encoding is optimized for the lower 127 ASCII characters.... The UTF-8 identifier is the Unicode byte order mark ... 0xEF 0xBB 0xBF. The byte order mark is used to distinguish UTF-8 text from other encodings."
That was enough: My UTF-8 XML payload needed BOM so that System.IO.BinaryReader would read it as UTF-8 rather than plain ASCII. It would have been much easier to spot the problem had the XML in the request message contained BOM. Alas, that wasn’t the case.
I changed the server to generate the BOM and my client (using MA0R) happily handled the non-Latin content. Needless to say that it didn’t matter what the CCSID of the message was (although, I think it should be 1208).
Note that WS-I Basic Profile 1.0 states that a compliant implementation should accept payload with or without BOM, so no problems with interoperability here.
I hope this will help others who may run into the same problem.
Cheers,
Ivo |
|
Back to top |
|
 |
mfuini |
Posted: Thu Jan 20, 2005 6:25 pm Post subject: VB.NET to Mainframe |
|
|
Novice
Joined: 20 Jan 2005 Posts: 15
|
I may be having a similiar problem.
I am using the .NET classes to send a message from VB.NET from a qmgr with CSSID 437 to a mainframe QMGR witt CSSID 819. My message is rejected on the mainframe end by mq and mq tries to put it in a dead letter queue. But they don't have a dead letter queue so I don't have any information on what is actually getting sent. Then my channel stops with a message saying 'the last batch of messages was not received by the client' on their side they are getting a message 2087 which is something about an object being in use.
Did anyone have this type of issue or any insights? _________________ Mark Fuini
markfuini@yahoo.com |
|
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
|
|
|
|