Author |
Message
|
jugadu |
Posted: Mon Jul 07, 2008 4:38 am Post subject: Validation on Compute Node |
|
|
Apprentice
Joined: 04 Dec 2007 Posts: 30
|
Can any XML message be validated against a message set on Compute node. In other words, it should propagate the message to the failure terminal when a mandatory field is not present or it is not well formed. |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 07, 2008 4:43 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
u need to use some other node along with compute node to validate....
i assume you are setting msg format name type etc in compute node... using RCD/validate node after compute node shall do the job for u.... _________________ Cheers |
|
Back to top |
|
 |
jugadu |
Posted: Mon Jul 07, 2008 4:54 am Post subject: |
|
|
Apprentice
Joined: 04 Dec 2007 Posts: 30
|
Ok..
I want to check validation on the second node. i.e.
MQINPUT->SecondNode
This is because first i need to check which message type is that.There are five type of message coming in thru one Queue only. And for each message their is a different message set. I was considering this second node as Compute node, where I will check the message type and set the Message set ID accordingly. This is more like deciding message set at run time.
I am confused which way to go. Plz help me  |
|
Back to top |
|
 |
AkankshA |
Posted: Mon Jul 07, 2008 5:46 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
If your input message does not have message set/format/type fields populated.. then you can populate them in a compute node...
place a RCD after this copute node and your message tree structure as per the format shall be created for you... _________________ Cheers |
|
Back to top |
|
 |
sridhsri |
Posted: Mon Jul 07, 2008 6:06 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
I assume that all the 5 msgs are XML based messages. If this is the case, perhaps using a compute node to decide the type of message is the best (look for occurance of tags or values of tags). Once you determin th type of msg this way, you can set the Output Properties and propagate the message. You could also set the "validate" option on compute. This should automatically validate the output msg. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 07, 2008 6:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Very poor problem description. Please take time to describe what you are trying to do.
Quote: |
for each message their is a different message set |
Why have five different message sets? Why not five message definitions within one message set?
How do you work out which message set to use?
What is the message format ( XML/COBOL/text )? |
|
Back to top |
|
 |
jugadu |
Posted: Mon Jul 07, 2008 7:34 am Post subject: |
|
|
Apprentice
Joined: 04 Dec 2007 Posts: 30
|
yes the message is XML..i am able to decide the message types based on the root tags, but not able to perform validation against corresponding message definition on compute node. Validate node and RCD also not validating.
If i use validate node, even the correct message is going to failure terminal.  |
|
Back to top |
|
 |
sridhsri |
Posted: Mon Jul 07, 2008 7:59 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
you may not need a validate node. if you set the "validate" option on a compute node, it validates the outgoing message. Having said that, if you message is failing on the "validate" node, then there must be something wrong with the message - i.e., it does not match the message set. Check where the error is and why the message is not in compliance with the message set. |
|
Back to top |
|
 |
broker_new |
Posted: Mon Jul 07, 2008 8:02 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
It can be done in two ways.
1)
If you are creating 5 different message defnition files for each type.
In the MQInput node donot mention the message type it will parse the message for you.
2)
you have to mention the message type in MQInput.
If you are defining only one message defnition file and adding all the 5 complex elements under that making all the 5 types as optional(min occurs 0) it will parse and validate the message for you. |
|
Back to top |
|
 |
|