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 to Validate XML message against Schema dynamically

Post new topic  Reply to topic
 How to Validate XML message against Schema dynamically « View previous topic :: View next topic » 
Author Message
kumar7890
PostPosted: Sat Sep 01, 2012 2:10 pm    Post subject: How to Validate XML message against Schema dynamically Reply with quote

Newbie

Joined: 25 Jun 2012
Posts: 4

I am newbie to WMB and I am building a message flow which will act as proxy service to many webservices at the backend.This flow will be triggered for many service requests from consumers.Schema of incoming message various from request to request.My requirment is to validate the incoming message against SCHEMA dynamically.What are all the options available ? is there any in-built node to do this task? We are using WMB VERSION 8. I appreciate if someone can guide me in the direction .

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Sep 01, 2012 2:20 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What you've said doesn't make any sense.

A single web service has a very tight coupling to it's definition of request and response message and a tight coupling between consumer and provider.

If I tie my brain in knots, and try and think what you might be possibly trying to do - maybe you want to set up a gateway that validates messages before it forwards them to the actual web service provider.

If that's the case, somehow, then you should purchase WebSphere Registry and Repositry (WSRR) and use the nodes that come with broker to let you interact with WSRR (RegistryLookup and EndpointLookup).

If you don't want to *validate* the webservice request against the WSDL for a given service, then you should instead just use the SOAP nodes in Gateway mode, and allow the back end provider to actually enforce the contract.
Back to top
View user's profile Send private message
kumar7890
PostPosted: Sat Sep 01, 2012 2:35 pm    Post subject: Reply with quote

Newbie

Joined: 25 Jun 2012
Posts: 4

mqjeff wrote:
What you've said doesn't make any sense.

A single web service has a very tight coupling to it's definition of request and response message and a tight coupling between consumer and provider.

If I tie my brain in knots, and try and think what you might be possibly trying to do - maybe you want to set up a gateway that validates messages before it forwards them to the actual web service provider.

If that's the case, somehow, then you should purchase WebSphere Registry and Repositry (WSRR) and use the nodes that come with broker to let you interact with WSRR (RegistryLookup and EndpointLookup).

If you don't want to *validate* the webservice request against the WSDL for a given service, then you should instead just use the SOAP nodes in Gateway mode, and allow the back end provider to actually enforce the contract.


Your understanding is correct . I am not tying any wsdl's with SOAP nodes and it will be in gateway mode. Main advantage i see with this design is one message flow is enough for many web services .
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Sep 01, 2012 5:24 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Whether it's "enough" or not depends entirely on context.

If nothing else, you can always extract the message from the soap envelope. As long as all of your services have unique root elements, and you've deployed *all* of the schemas that model *all* of your services to the EG running your flow, the XMLNSC parser will find the right schema and validate it.

But this is a largely bad idea in many contexts, likely including yours.
Back to top
View user's profile Send private message
goffinf
PostPosted: Sun Sep 02, 2012 9:01 am    Post subject: Reply with quote

Chevalier

Joined: 05 Nov 2005
Posts: 401

Personally I find using XSD validation much too blunt a tool for most purposes and significantly lacking in other well known areas (somewhat resolved in v1.1 but that's not supported in Broker yet).. Of course this depends partly on the degree of constraints that you have defined, but a lot of the time I come across schemata with quite a lot of optionally, little type constraint and few additional facets, .. But YMMV

I prefer using a more 'selective' style which typically involves using more Xpath based expressions (perhaps even schematron) and/or performing validation as part of transformation logic.

This style might be more relevant to you if you are considering a gateway pattern, although in reality, you are just delaying where and who is responsible for that work. In many cases this will be your business application rather than Broker, but, sometimes it is useful to run at least some of this further out as an optimisation or to allow a larger (perhaps even 24x7) window for accepting business transactions.

Fraser.
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 to Validate XML message against Schema dynamically
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.