|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
dynamically validate message structure |
« View previous topic :: View next topic » |
Author |
Message
|
cmmatei |
Posted: Wed Apr 25, 2007 2:02 am Post subject: dynamically validate message structure |
|
|
 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 |
|
 |
marcin.kasinski |
Posted: Wed Apr 25, 2007 2:23 am Post subject: Re: dynamically validate message structure |
|
|
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 |
|
 |
rajasri |
Posted: Wed Apr 25, 2007 3:56 am Post subject: |
|
|
 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 |
|
 |
cmmatei |
Posted: Sat Apr 28, 2007 7:41 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|