ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » \r\n being converted to #xd;.

Post new topic  Reply to topic
 \r\n being converted to #xd;. « View previous topic :: View next topic » 
Author Message
findingsolution
PostPosted: Tue Nov 09, 2010 5:38 pm    Post subject: \r\n being converted to #xd;. Reply with quote

Novice

Joined: 27 Jul 2010
Posts: 11

Hi

I am doing first JMS(Message driven bean) application. Here I need to send REXO message to REXO output queue. The content of message is in xml format. The payload consists of 3 lines OP........,OB.......,CL....... . I construct payload by picking values from database (DB2) and at the end of OP..... i need to place \r\n. Similarly at the end of OB and CL i need to place \r\n. In the code i add it like this
String payload ="OPsadasdasdasdasdadad"+"\r\n"+
"OBsadasdasdasdasdasdasd"+"\r\n"+"CLdsadasdasdasddddddasdasdasd"+"\r\n";


When I output the message using System.out.println I am getting it in proper format i.e .

OPsadasdasdasdasdadad
OBsadasdasdasdasdasdasd
CLdsadasdasdasddddddasdasdasd

But when I see it in REXO queue I get #xd;. instead of \r\n.

[code]<ESB_Envelope>

<ESB_VERSION>1.0.1</ESB_VERSION>

<MSG_TYPE>

<MSG_TYPE_NAME>REXO</MSG_TYPE_NAME>

<MSG_INDICATOR>1/1</MSG_INDICATOR>

<REX_ATTEMPT_INDICATOR>1</REX_ATTEMPT_INDICATOR>

<REX_INDICATOR>1/1</REX_INDICATOR>

<SUBFLOW>

<SUBFLOW_NAME>fghgfh</SUBFLOW_NAME>

</SUBFLOW>

</MSG_TYPE>

<TID>5500000000000000000A</TID>

<TID_TIME_STAMP>2010-11-08T11:55:03Z</TID_TIME_STAMP>

<IDFLOW>fhfghf</IDFLOW>

<SENDER>fghfh</SENDER>

<LOGICAL_TARGET>jkhjk</LOGICAL_TARGET>

<FLOW_VERSION>001</FLOW_VERSION>

</ESB_Envelope>

</Header>

<Payload>OPsadasdasdasdasdadad&#xd;.OBsadasdasdasdasdasdasd&#xd;.CLdsadasdasdasddddddasdasdasd&#xd;.</Payload>

</ESB_Msg> [/code]

Please help me to solve this. Is any configuration required in output queue to recognise \r\n or anything can be done in Message driven bean ??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 09, 2010 8:39 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

OK, lets regroup...
so you get &#xd; which stands for hex 0d (carriage return)
Looks like you're just missing &#xa; (hex 0a for line feed) right after that ...
Wait! there is a "." right after that. This could be displayed in lieu of an "unprintable" character...

Really what is the hex value of the character following &#xd; ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
findingsolution
PostPosted: Tue Nov 09, 2010 9:26 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2010
Posts: 11

Hi thanks for the reply

After &#xd; (i.e \r) there is \n for sure. I don't know why it is coming up as dot(.)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Nov 10, 2010 1:09 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

findingsolution wrote:
Hi thanks for the reply

After &#xd; (i.e \r) there is \n for sure. I don't know why it is coming up as dot(.)

The fault is with your display program.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
findingsolution
PostPosted: Wed Nov 10, 2010 9:57 pm    Post subject: Reply with quote

Novice

Joined: 27 Jul 2010
Posts: 11

means?? I did not understand
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 11, 2010 3:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

findingsolution wrote:
means?? I did not understand


Your program is displaying it as a dot. It's not actually the value for a dot. This is why examining the actual values is so important.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » \r\n being converted to #xd;.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.