Author |
Message
|
steldass |
Posted: Mon May 20, 2002 1:31 am Post subject: [b]Message from client (me) arrives as "garbage"[/ |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
I am trying to send an XML string to a company which uses MQSeries Server. After talking to them they told me that I am sending garbage. I have set the environment variable MQCCSID to 850 after their instruction. My default encoding is 1253 (Greece) and I am using Windows 2000 and IIS 5.0 Why is this happening?
Thanks in advance for your help!
 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon May 20, 2002 3:53 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Is your message format in the MQMD set to MQSTR?
Are they also specifying the CONVERT option on their MQGET call? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 4:03 am Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
First of all thanx for your reply. Suppose that my message object is msg.
I wrote:
msg.Format = "MQSTR "
Is that correct? If not how do I set the message format?
I think that they have specified the CONVERT option.
I also had an instruction to set an environment variable MQCCSID=850.
Thanx  |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon May 20, 2002 4:10 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I do believe that the constant MQC.MQFMT_STRING == "MQSTR", so you should be okay there. (Probably safer to set it to the IBM defined constant though, for readability of the prog and in case it ever changes).
So double check that they are in fact asking for CONVERT on their side.
What exactly do they mean by garbage? All the bytes are unreadable? Or an occasional character? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 4:15 am Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
This is what I am sending to them:
..._%......?>...........?..%../.....%..>.............../.>/..?>/%..`..<.../.>/..?>/%..`......,.>./.................,.>./........,?.../.................,?.../....../......`.?...<|+...../......`.?....../....?..%./...?.`....../....?..%./...?.`..../....?..%%?./..?>....../....?..%%?./..?>...??_.>.?.>._...................`......<....??_........<....??_....../........../.......??_....??_.>.?....?..%../....
Not much sense huh?
I will double check with them and see about CONVERT option.
But what if they have set it normally??? |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon May 20, 2002 4:24 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
What if the sun doesn't rise in the east tomorrow?
Let's cross that bridge when we get there, i.e. I am pretty sure that is what the problem is. By the way, what happens if you unset MQCCSID and try the test again? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon May 20, 2002 4:32 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Oh, and garbage in = garbage out, no? If that is what you are sending them from your side, and that is what they see on their side, then MQ did it's job.
Can you send them a plain text message like "MQSeries is cool" and see what happens? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 4:32 am Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
Hmmmm... That is an interesting idea. I will unset the variable and see what will happen.
Thank you SO much! I have already send an email to the company asking them if they have specified the CONVERT option.
I will get back at you as soon as possible.
Thanx man  |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 4:34 am Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
The thing is that if I send them anything else but XML, they will not respond. I have to send specific XML text.
Another thing to bare in mind is that I am sending on one queue while they are responding to another queue. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon May 20, 2002 4:45 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
the thing is that
..._%......?>...........?..%../
IS garbage.
It would be nice to send <MQMessage>MQSeries is Cool</MQMessage> and see what they say. Now maybe their app can't handle any old XML message, in which case they can stop the app and use amqsget on the queue to see what is there at that point. If it looks good then we know the problem might be in their app.
I just dealt with this myself. We had an NT app the simulates the mainframe. This NT app puts out EBCDIC data! So when the NT client dropped this EBCDIC message on a queue, the client CCSID is attached to the message (437 for NT). The next app that picked up this message (MQSI) went to convert it to Unicode. MQSI says "okay, I gotta convert this data. From what CCSID? Oh, 437. OK must be ASCII data." And then it throws up cause of all the EBCDIC. We solved it by setting CCSID IN THE APP (NOT the MQCCSID Env. Variable!!!) to 500 (mainframe). Now the converting app knew how to convert properly.
Setting Env. variable MQCCSID to 500 prevented me from even getting a good PUT, I think because setting the CCSID at the system level caused the header as well to be treated as EBCIDIC, which it wasn't (NT client produces an ASCII header). _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 5:03 am Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
I just tried to completely remove the MQCCSID from the environment variables. Same old, same old... Nothing changed.
The point is that I don't have a monitor tool in order to see what exactly it is that I am sending to them. They had set up a test queue in order to send and receive messages and test my connection.
Everything went well. I sent messages and received them succesfully. Which leads me to what YOU said. The problem must be in their application. They might be expecting different format or something.
I will try to find out more and be in touch with you. |
|
Back to top |
|
 |
steldass |
Posted: Mon May 20, 2002 11:20 pm Post subject: |
|
|
 Newbie
Joined: 07 May 2002 Posts: 9
|
Dear Peter,
Since I am working on IIS and ASP, I tried to HTMLEncode the string that I am sending. Guess what! It worked...
I finally got a normal answer. Well not a correct answer, I still get errors but this time they come from their application in XML format.
I just wanted to tell you that you were a great help to me and I trully thank you very much.
Cheers,
 |
|
Back to top |
|
 |
|