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 » XML validation

Post new topic  Reply to topic
 XML validation « View previous topic :: View next topic » 
Author Message
RocknRambo
PostPosted: Wed Feb 03, 2010 1:32 pm    Post subject: XML validation Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

we are having mixed opinion in our team in regards to message (XML) validation in the input node.

The discussion is around, do we need to validate every single XML message against the predefined XSD sent from the source system. Listing in the Pros/Cons - Might impact performance (though MBv7 claims much better Parsers, restricting the developer to create a message set for every transformation needs, better error management, if the source system has changed XSD without communicating with Middleware team)

Any one has better thoughts on the need for validating every single message (XML) if the source is trusted and services are secured


--
Rock
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 03, 2010 1:48 pm    Post subject: Reply with quote

Grand High Poobah

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

My 2 cents:

If you've got an XSD you should validate the message. The performance hit is negligable and even if it's a trusted source there's a good chance (as you intimate) that the XSD will change at some point & you'll accidently not be given the new one.

One counter to this I've heard was that if the XSD changes frequently the burden on WMB administration becomes too high. My response is that if it changes that often it's even more essential to validate the message and weed out those that can't be processed!

Other points of view may be equally valid, etc, etc.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Feb 03, 2010 2:16 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Since you will be using XMLNSC, schema validation is cheap - typically ~25% extra CPU cost. However, don't take my word for it - it's simple to run a few throughput tests with validation enabled/disabled.
Once you know the real cost, only you and your team can decide whether it's worth it.
You might want to consider this: if you don't validate the incoming messages, then your message flow logic might need to do a lot more checking of its inputs. That extra checking will consume CPU. But if the schemas are not particularly strict, then you'll need to have do most of the required error checking in your flow either way.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Feb 03, 2010 2:26 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

If you don't use XMLNSC Validation then you have just made Broker the fall guy.

If an upstream team changes their message structure and then sends the new format to you and you don't detect this then the all the pressure to fix it will be on you even thouh it is not your fault.
On the otherhand if you use validation then you will quickly pick up that the foramt of the message has changed and then you will be in a much better position to challenge the team who made the changes without your involvement.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
nathanw
PostPosted: Thu Feb 04, 2010 12:29 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

smdavies99 wrote:
If you don't use XMLNSC Validation then you have just made Broker the fall guy.

If an upstream team changes their message structure and then sends the new format to you and you don't detect this then the all the pressure to fix it will be on you even thouh it is not your fault.
On the otherhand if you use validation then you will quickly pick up that the foramt of the message has changed and then you will be in a much better position to challenge the team who made the changes without your involvement.


and thus maybe put a stop to the automatic problem with MQ and Broker that theya re always blamed if there is a problem.
_________________
Who is General Failure and why is he reading my hard drive?

Artificial Intelligence stands no chance against Natural Stupidity.

Only the User Trace Speaks The Truth
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML validation
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.