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 » Physically Invalid XML - When does it fail the XML Parser

Post new topic  Reply to topic
 Physically Invalid XML - When does it fail the XML Parser « View previous topic :: View next topic » 
Author Message
plewton
PostPosted: Mon Mar 15, 2004 7:47 am    Post subject: Physically Invalid XML - When does it fail the XML Parser Reply with quote

Novice

Joined: 20 May 2003
Posts: 14

Hi,

I'm running WBI Msg Broker 5.0.2. I have an MQInput node using the XML Parser to read input XML messages. Both the Failure and Catch terminals of the Input Node are connected to an MQOutput node, bound to an error queue. I have the settings on the Input node to

Validate: Content and Value
Failure Action: Exception
Timing: Immediate

Not all physically invalid XML messages I put on the input queue end up on the error queue as I'd expect.

If I take a valid XML file and delete the end so that it ends half way through an element value then an exception is thrown and the message goes to the error queue.

However, If I take a valid XML file and delete the final bracket or delete the end so that it ends half way through an element name then an exception is NOT thrown and the message goes through without problem.

Why is this? Surely all physically invalid XML should be picked up and sent to the error queue?

Thanks!
Back to top
View user's profile Send private message
TonyD
PostPosted: Mon Mar 15, 2004 1:52 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

The validation addressed through MQInput node properties only applies against predefined messages.
Back to top
View user's profile Send private message Send e-mail
JLRowe
PostPosted: Tue Mar 16, 2004 4:09 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

The 'just in time' parsing technique means that if you do not reference an invalid element, or update the message tree (which will cause the whole message to be parsed), it will pass through without an exception. The output message is simply copied from the input bitstream and is not constructed from the message tree.

You can force the parse with a trace node, referencing the last element in a message or by recursively referencing every element in the message.
Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Tue Mar 23, 2004 5:31 am    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

if you specifiy validation - immediate in the input node, the
parser should parse the whole message in the input node.

I have observed the same behavior that WBIMB does not
validate the message bitstream until the end of the
buffer, hence if the final closing XML tag is damaged
WMQI does *not* notice this. Such an XML document
is not even well-formed.

I consider this a bug which should be reported to IBM
support.
_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
Back to top
View user's profile Send private message
JLRowe
PostPosted: Tue Mar 23, 2004 8:00 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

Also remember that the validation mode only applies to MRM domain messages, XML & XMLNS domain messages are validated on a just in time basis.

I do not use the validate options on the input node as my patterns dictate that I catch the error and log it first, validation errors go straight to the failure terminal. I force validation with a recursive procedure that walks every node of the message tree.
Back to top
View user's profile Send private message Send e-mail
mpuetz
PostPosted: Tue Mar 23, 2004 2:10 pm    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

true, validation can only be done for MRM defined messages,
but if you choose validation - immediate for XML and XMLNS
you get at least well-formedness checking, and the message
tree is built completely if you leave the input node.
_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
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 » Physically Invalid XML - When does it fail the XML Parser
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.