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 » dynamically validate message structure

Post new topic  Reply to topic
 dynamically validate message structure « View previous topic :: View next topic » 
Author Message
cmmatei
PostPosted: Wed Apr 25, 2007 2:02 am    Post subject: dynamically validate message structure Reply with quote

Apprentice

Joined: 06 Feb 2006
Posts: 26
Location: PARIS/NEW YORK

Hello,

I have to solve the follwing case:

Application A sends to a WMB flow a set of different xml messages through one WMQ link:

<?xml version="1.0"?><!DOCTYPE MESSAGE SYSTEM "rocml_argosMAGES1.dtd"><MESSAGE>...
<?xml version="1.0"?><!DOCTYPE MESSAGE SYSTEM "rocml_argosMAGES1.dtd"><MESSAGE>...
<?xml version="1.0"?><!DOCTYPE MESSAGE SYSTEM "rocml_argosSMON.dtd"><MESSAGE>...
....

A WMB flow reads these mixed messages and must validate their structure and content according to a message set (build from dtd).
Structures are used and defined by a set of dtd. A message set was built for a dtd.

I would like to dynamically validate these messages, for example:

MQInput - > RCD (Validate) -- > XML Transformation -- > MQOutput

How to deal with this problem?
Where can I find a good example ?

Thank you in advance.

Cornel
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Wed Apr 25, 2007 2:23 am    Post subject: Re: dynamically validate message structure Reply with quote

Sentinel

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

You can parse input message as a simple XML and read dtd file from this message.

According to red DTD you can propagate message to specific label.
Then after every label you place RCD with specific MRM created from specific DTD.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
rajasri
PostPosted: Wed Apr 25, 2007 3:56 am    Post subject: Reply with quote

Centurion

Joined: 11 Jun 2006
Posts: 114

Hi cmmatei, in your design, there must be someway to distinguish the XML Documents in your message. That way try to extract the xml documents one at a time and create a root in Environment tree of XML domain. Then extract the specific dtd through this code

SET messagesetIDVar = Environment.Variables.XML.(XML.DocTypeDecl).(XML.SystemId);

Now using if condition or switch with the messagesetIDVar in the condition, parse the root element in Environment.Variables.XML using ASBITSTREAM function specifying RootBitStream as OPTIONS and the remaining options like SET ( which depends on messagesetIDVar ),TYPE etc.

So you are dynamically validating the XML documents in the message. You can do this all in a single compute node, no need to use RouteToLabel node or multiple RCDs.

Folks, please correct me if i went wrong somewhere.
Back to top
View user's profile Send private message
cmmatei
PostPosted: Sat Apr 28, 2007 7:41 am    Post subject: Reply with quote

Apprentice

Joined: 06 Feb 2006
Posts: 26
Location: PARIS/NEW YORK

Thank you for yo answers.
I tried label solution and everything works fine.

I hope that stress test will also be correct (I have 20 label nodes).

I'll see for the second solution which seems very interesting.

Cornel
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 » dynamically validate message structure
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.