Author |
Message
|
Vitor |
Posted: Mon Nov 29, 2010 5:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anirudhworld wrote: |
When the request is put in a string format a space character is getting appended after each letter may be some text encoding issue i.e, using UTF format |
What, you think that when using UTF (i.e. a double byte character set) and reading it back as a string (i.e. a single byte) you get extra characters and you're surprised??  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
anirudhworld |
Posted: Mon Nov 29, 2010 10:08 pm Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
Quote: |
What, you think that when using UTF (i.e. a double byte character set) and reading it back as a string (i.e. a single byte) you get extra characters and you're surprised??
|
Boss ,writing it in a utf format and also reading it in a utf format(refer the code).
The issue was when writing the request message in a string format into the request queue. this was traced by the provider which were reading the request and need to respond it back.Some where in forums read that there might be some encoding issue ,hence using it.
Correct me if am wrong
Quote: |
post the request message
post the reply message
|
Request message : Input will be a XML string
ex:
<?xml version="1.0" standalone="yes"?>
<tags >required tags used for providing input</tags>
Response message: Will return a xml string |
|
Back to top |
|
 |
Mr Butcher |
Posted: Mon Nov 29, 2010 11:25 pm Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
can you please post the request message you are sending out, including all headers, and the response message that sits in the reply queue that your program is not able to get (also including all headers) _________________ Regards, Butcher |
|
Back to top |
|
 |
anirudhworld |
Posted: Tue Nov 30, 2010 1:19 am Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
Mr Butcher wrote: |
can you please post the request message you are sending out, including all headers, and the response message that sits in the reply queue that your program is not able to get (also including all headers) |
Request Message:
Code: |
<?xml version="1.0" standalone="yes"?>
<sr:srService xmlns:sr="http://xyz.com/domain">
<sr:operation />
<sr:Info>
<commBO:x1 xmlns:commBO="http://xyz.com/domain">SR</commBO:x1>
<commBO:x2 xmlns:commBO="http://xyz.com/domain" />
<commBO:x3 xmlns:commBO="http://xyz.com/domain" />
<commBO:x4 xmlns:commBO="http://xyz.com/domain" />
<commBO:x5 xmlns:commBO="http://xyz.com/domain" />
<commBO:x6 xmlns:commBO="http://xyz.com/domain">Sample1</commBO:x6>
<commBO:x7 xmlns:commBO="http://xyz.com/domain" />
<commBO:x8 xmlns:commBO="http://xyz.com/domain">Sample2</commBO:x8>
<commBO:x9 xmlns:commBO="http://xyz.com/domain" />
<commBO:x10 xmlns:commBO="http://xyz.com/domain" />
<commBO:operationName xmlns:commBO="http://xyz.com/domain">SR</commBO:operationName>
</sr:Info>
<sr:errorInfo>
<commBO:Code xmlns:commBO="http://xyz.com/domain" />
<commBO:Message xmlns:commBO="http://xyz.com/domain" />
<commBO:severity xmlns:commBO="http://xyz.com/domain" />
</sr:errorInfo>
<sr:serviceinfo>
<sr:retryCount />
<sr:retryInterval />
<sr:correlationId />
</sr:serviceinfo>
<sr:Input>
<sr:No>123</sr:No>
</sr:Input>
<sr:Output>
<sr:No>2</sr:No>
<sr:sr1>2</sr:sr1>
</sr:Output>
</sr:srService>
|
Response message :
Output will be returned in the same xml string[/code] |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Nov 30, 2010 3:32 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
this is just the payload. i want to see the message with all mq headers like it is sitting in the queue. e.g. output from amqsbcg sample program.
your mqget is mnost likely not working because you do not receive wwhat you expect, or you do not send what you think you are sending. dont know. at least this is not a payload problem. so please show us the messages as they are sitting in the queue with ALL MQ headers.
stop the replying application
put your request message
use amqsbcg to dump the message from the replying application input queue
stop your request application
start the replying application. this one should now process the message in the input queue and create the reply to the reply queue
use amqsbct to dump the reply message from the reply queue.
if you can not get your hands on the replying application input queue because it is remote, then maybe stop the channel to the remote qmgr and dump the message from the xmitq. _________________ Regards, Butcher |
|
Back to top |
|
 |
shashikanth_in |
Posted: Tue Nov 30, 2010 3:43 am Post subject: |
|
|
Centurion
Joined: 26 Feb 2009 Posts: 123
|
|
Back to top |
|
 |
anirudhworld |
Posted: Tue Nov 30, 2010 5:38 am Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
Mr Butcher wrote: |
this is just the payload. i want to see the message with all mq headers like it is sitting in the queue. e.g. output from amqsbcg sample program.
your mqget is mnost likely not working because you do not receive wwhat you expect, or you do not send what you think you are sending. dont know. at least this is not a payload problem. so please show us the messages as they are sitting in the queue with ALL MQ headers.
stop the replying application
put your request message
use amqsbcg to dump the message from the replying application input queue
stop your request application
start the replying application. this one should now process the message in the input queue and create the reply to the reply queue
use amqsbct to dump the reply message from the reply queue.
if you can not get your hands on the replying application input queue because it is remote, then maybe stop the channel to the remote qmgr and dump the message from the xmitq. |
I dont have access to that system and have reqested the other team to share the message headers ,will share once i recieve it .
One more update :Now the end team has once again reported space issue after each character when we push the message in request queue
for ex:
Code: |
< ? x m l v e r s i o n = " 1 . 0 " s t a n d a l o n e = " y e s " ? >
|
May be beacuse of this its unable to read the xml properly and serve the request. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 30, 2010 6:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
anirudhworld wrote: |
I dont have access to that system and have reqested the other team to share the message headers ,will share once i receive it .
One more update :Now the end team has once again reported space issue after each character when we push the message in request queue
for ex:
Code: |
< ? x m l v e r s i o n = " 1 . 0 " s t a n d a l o n e = " y e s " ? >
|
May be beacuse of this its unable to read the xml properly and serve the request. |
Wrong conclusion. There is a reason we asked for the message headers. I suspect a CCSID error on the producing application. If the CCSID on the MQ header does not correspond to the CCSID of the content you might see problems like the one you describe. I.e. the space issue that you describe seems much like a UTF-16 problem. Remember that if using .NET the native format is not ANSII and you may have to translate the character set before writing to the message, or set the CCSID of the content on the message. This would be a programming error on the part of the message producer.
It really all depends whether you are using writeBytes or writeText as method as the string to bytes does not necessarily produce the effect you would expect and is tied to a coded char set.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Nov 30, 2010 6:26 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Problem-determination in WMQ usually involves inspecting the actual message (message descriptor and application data) created by the requesting application; AND inspecting the reply message (again, MQMD and application data) or the reply message.
Inspecting the message means using a utility such as amqsbcg(c). _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
anirudhworld |
Posted: Tue Nov 30, 2010 6:43 am Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
fjb_saper wrote: |
anirudhworld wrote: |
I dont have access to that system and have reqested the other team to share the message headers ,will share once i receive it .
One more update :Now the end team has once again reported space issue after each character when we push the message in request queue
for ex:
Code: |
< ? x m l v e r s i o n = " 1 . 0 " s t a n d a l o n e = " y e s " ? >
|
May be beacuse of this its unable to read the xml properly and serve the request. |
Wrong conclusion. There is a reason we asked for the message headers. I suspect a CCSID error on the producing application. If the CCSID on the MQ header does not correspond to the CCSID of the content you might see problems like the one you describe. I.e. the space issue that you describe seems much like a UTF-16 problem. Remember that if using .NET the native format is not ANSII and you may have to translate the character set before writing to the message, or set the CCSID of the content on the message. This would be a programming error on the part of the message producer.
It really all depends whether you are using writeBytes or writeText as method as the string to bytes does not necessarily produce the effect you would expect and is tied to a coded char set.  |
The other team is confusing me a lot. now they are saying that they are getting the message without spaces and am trying to get message headers. |
|
Back to top |
|
 |
anirudhworld |
Posted: Wed Dec 01, 2010 12:21 am Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
Finally got some information
Code: |
RFH Ä MQSTR
<mcd>
<Msd>xmlns</Msd>
</mcd> |
<jms>
<Dst>queue:///RQ</Dst>
<Rto>queue:///RP</Rto>
<Tms>1291237009906</Tms>
<Dlv>2</Dlv>
</jms> |
Is this enough? |
|
Back to top |
|
 |
Mr Butcher |
Posted: Wed Dec 01, 2010 3:47 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
no. the mq header holds binary fields we need to see. and we need to see both the request and the reply
what we need is something like this
Code: |
mqm@mymachine:~> /opt/mqm/samp/bin/amqsbcg SYSTEM.DEFAULT.LOCAL.QUEUE > amqsbcg.output.txt
mqm@mymachine:~> cat amqsbcg.output.txt
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.DEFAULT.LOCAL.QUEUE'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51202020202020202020202020204C83186B20C25002'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QMGRNAME '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0431303030000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20101201' PutTime : '11434018'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 35 bytes
00000000: 7468 6973 2069 7320 6A75 7374 2074 6F20 'this is just to '
00000010: 7368 6F77 2061 6D71 7362 6367 206F 7574 'show amqsbcg out'
00000020: 7075 74 'put '
|
_________________ Regards, Butcher |
|
Back to top |
|
 |
anirudhworld |
Posted: Wed Dec 01, 2010 5:42 am Post subject: |
|
|
Novice
Joined: 26 Nov 2010 Posts: 17
|
I have asked for the MQMD info and gave the sample
and now what they are saying is
they are expecting the below information set in RFH2 header
Code: |
RFH Ä MQSTR
<mcd>
<Msd>xmlns</Msd>
</mcd> |
<jms>
<Dst>queue:///RQ</Dst>
<Rto>queue:///RPO</Rto>
<Tms>1291237009906</Tms>
<Dlv>2</Dlv>
</jms> |
|
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 01, 2010 5:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anirudhworld wrote: |
they are expecting the below information set in RFH2 header |
Ok, we started this thread with you complaining about a 2033 and we asked for the MQMD (which is key to the problem you described).
Then you started complaining about extra spaces because you'd got the CCSID & .NET all mixed up.
Now you're talking about the content of an RFH2.
What exactly is the issue here?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Wed Dec 01, 2010 6:30 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
Quote: |
they are expecting the below information set in RFH2 header |
so your request message is not in the format they expect? because from the code you showed us you are not creating a RFH2 header.
so if your request messages is wrong, no reply is generated?
if no reply is generated, no message is sent to your replyto queue and you get the 2033?
from what you wrote first i assumed you received a reply, but the mqget failed. from what you wrote last, i assume you never received a reply.
and so far, you never said you really received a reply message in the replytoq. did you? if yes, show it to us by dumping it with amqsbcg. if not, why do you wonder about a 2033 ?!?
i suggest you first find out if your request message is in the proper format. then if it is you should make sure a reply is generated and hits your replytoq. then try to mqget it. try to make these single steps working, not all in one go as it seems to be hard for you to see (and to tell us) what the problem really is.
. _________________ Regards, Butcher |
|
Back to top |
|
 |
|