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 » NOT well formed XML

Post new topic  Reply to topic
 NOT well formed XML « View previous topic :: View next topic » 
Author Message
x061294
PostPosted: Mon Mar 26, 2007 8:56 am    Post subject: NOT well formed XML Reply with quote

Acolyte

Joined: 05 Apr 2005
Posts: 62

WBIMB 6.0.0.3 on linux

Everyone/everything in broker always talks about working with well formed XML. That's a good thing. But, how are people verifying that they are receiving well formed xml?

We would like to determine if we have well formed XML before we start to process the data and was wondering what would be the best way to do this. We are not defining our data in the MRM, and I'm not looking to do schema validation. Just want to make run the data through a separate flow/process/node to do that generic service before running it into the business process logic. That way I can deal with it in one place and not worry all my business logic processing to have to check for parsing errors.

Thoughts? Was wondering if ABITSTREAM could help us our, or, run it through an XSLT transforming nothing, etc?

Appreciate any ideas/suggestions.
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Mar 26, 2007 10:59 am    Post subject: Re: NOT well formed XML Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

x061294 wrote:
WBIMB 6.0.0.3 on linux

Everyone/everything in broker always talks about working with well formed XML. That's a good thing. But, how are people verifying that they are receiving well formed xml?

We would like to determine if we have well formed XML before we start to process the data and was wondering what would be the best way to do this. We are not defining our data in the MRM, and I'm not looking to do schema validation. Just want to make run the data through a separate flow/process/node to do that generic service before running it into the business process logic. That way I can deal with it in one place and not worry all my business logic processing to have to check for parsing errors.

Thoughts? Was wondering if ABITSTREAM could help us our, or, run it through an XSLT transforming nothing, etc?

Appreciate any ideas/suggestions.


If you set domain on MQ Input node broker will check if message is well formed XML or not. If this is well formed XML message is processed. if not message is backout or goes to error terminal (depends on configuration, backout count etc.)
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Mon Mar 26, 2007 2:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
We would like to determine if we have well formed XML before we start to process the data
That's the wrong approach. The XML parser will not parse your message unless it is well-formed XML. ( and if it did, it would not deserve the name 'XML parser' ).
Just write your message flow to cope with errors ( check this forum and DeveloperWorks for advice about that ). Treat parsing errors as 'just another kind of error'.
Back to top
View user's profile Send private message
x061294
PostPosted: Tue Mar 27, 2007 3:38 am    Post subject: Reply with quote

Acolyte

Joined: 05 Apr 2005
Posts: 62

Appreciate the information kimbert. I was looking for/considering a generic "service" if you will, something I could feed in XML and be sure that it was well formed, taking as you said appropriate action at that time. Since in general MB is an on demand parser, was thinking if there was something I could do that would force a parse through the whole data stream and draw out those errors right away. Wondered what might be the best "tool" for this, if say an XSLT transformation node would be simple, or, if going through a compute node and doing a copy of a field that wasn't there, if I could force MB to search the whole data stream, was wondering if there was a way to get the whole stream in one go.

marcin.kasinski, thanks for the suggestion, but as for XML on the input node, a couple of things. One, I have a generic input node taking in blob because I don't know if it will be xml or not right off the bat. So it limits me a little there. Also, while this does sort of work, it rolls the message to the backout queue unless you code for the parsing errors, which therefore doesn't really solve my problem, just moves it.

Interestingly enough, if you pass in not well formed XML, with XML on the input node, and watch through the debugger, the message actually does get put out on the other side. If you don't have the debugger one, it rolls to the backout queue. So different action depending on if the debugger is watching or not. While you would never have the debugger on for real, it does make investigation of the problem a lot harder when the debugger causes different results than normal processing.
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 » NOT well formed 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.