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 » How does XML message validation against an XSD work

Post new topic  Reply to topic
 How does XML message validation against an XSD work « View previous topic :: View next topic » 
Author Message
hotshot
PostPosted: Tue Feb 26, 2013 9:44 am    Post subject: How does XML message validation against an XSD work Reply with quote

Novice

Joined: 04 Jan 2013
Posts: 20

Hi,

My question is in short: how does message validation work for WMB V8?

Details:
- Environment: OS = AIX, WMB V8.0.0.1
- Development: OS = Win7, WMB Toolkit V8.0.0.1
- I have a library which holds several message models, some of which are XSDs
- I have several message flows across separate applications (and projects) referencing the same library, which read from MQ/File/JMS , transform and output to MQ.
- I would like to validate the output of some of my message flows against the schemas loaded into the library.

While reading through the Infocenter on Message Validation in general and specifically on XMLNSC validation, I cannot find how the broker determines which schema to use for validation when I am setting the MQOutput node property Validate to "Content and value".

I have made a few tests and it seems that the broker will determine the schema using the root element of the message passed to the broker.
In my case I have several schemas which have the same root element name (i.e. order), so it might not fit the purpose.
Does anyone have some insight on how the broker will determine the XSD to be used in the described case with several schemas matching the root element name?

Also, can anyone point out a way to select a specific schema to validate against? Otherwise I might have to change my approach and split my library into smaller pieces, which kind of defeats some of the usability benefits of the library

Cheers,
B
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Feb 26, 2013 4:46 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I have made a few tests and it seems that the broker will determine the schema using the root element of the message passed to the broker.
Correct.
Quote:
In my case I have several schemas which have the same root element name (i.e. order), so it might not fit the purpose.
Currently that is not allowed. Within the scope of any Application, there must only be one instance of each QName in the deployed xsds.
Using Libraries will not get around that restriction - if you deploy two Libraries and they both contain the same QName then you will get a clash.
Quote:
Also, can anyone point out a way to select a specific schema to validate against?
Currently there is no way to do that. Well, not unless you use a Message Set, but don't do that unless you have no other option.
Quote:
Otherwise I might have to change my approach and split my library into smaller pieces
That might or might not work - it depends on exactly what you mean.
Back to top
View user's profile Send private message
McueMart
PostPosted: Wed Feb 27, 2013 2:09 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Utilising different namespaces for your root elements which have the same name (which is kind of the point of namespaces in the first place!), should allow you to avoid the clashes which kimbert mentioned.
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 » How does XML message validation against an XSD work
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.