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 » WebSphere Message Broker (ACE) Support » Control Charachters in XML

Post new topic  Reply to topic
 Control Charachters in XML « View previous topic :: View next topic » 
Author Message
nicojvr
PostPosted: Thu Jul 10, 2003 1:21 am    Post subject: Control Charachters in XML Reply with quote

Apprentice

Joined: 04 Jun 2003
Posts: 45

Hi,

I have a java client that receives XML from a a 3rd party which contains control characters ie (<LF> <CR>) this doesn't map properly to the message set i have constructed and causes the filter in the flow not to read the root node in the right place. I.e. if the root tag is suppose to be x and the message comes in <CR> <LF> <x> then the filter assumes <CR> is the root tag.
is there any way in which I can remove the control characters from the XML message before sending it through the rest of my flow?

thanks

N
Back to top
View user's profile Send private message
Michael Dag
PostPosted: Thu Jul 10, 2003 5:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

is this on all messages coming into that flow? you could decide to get the data of the queue as a BLOB, check for the <CR> <LF> in the first positions, if present, remove them and do an RCD node to XML...
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
inder
PostPosted: Thu Jul 10, 2003 6:04 am    Post subject: Reply with quote

Apprentice

Joined: 24 Mar 2003
Posts: 49
Location: USA

The ideal thing is for instead of checking every message for control characters, catch the parser exception, and have a sub flow to take care of this scenario. The ideal steps be

Catch the exception
Use a Reset content descriptor to convert the message to Blob
In a compute node parse the messages for Control characters and remove/replace them
Use again a Reset content descriptor to convert this message back to XML.
Pass the message back to the message flow.

There are two things to consider in this process.

Do you need a hard loop in your flow to handle this. I would suggest an altenate way of doing this is put the message back in the input queue of message flow with greater priority so that the message flow reads that message next thus maintaining the message order.

Secondly there can be other errors like incomplete XML which you can not fix. So make sure you have a check for the priority of the message so that if a message arrives to the subflow with priority set high instead of looping it through put it to a error queue or so....

Hope this helps
Regards
Inder
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 » WebSphere Message Broker (ACE) Support » Control Charachters in XML
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.