|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Applying XML Validation in Compute Node |
« View previous topic :: View next topic » |
Author |
Message
|
sri |
Posted: Sun Feb 13, 2005 10:38 am Post subject: Applying XML Validation in Compute Node |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
hello all.
Scenario:
1. The input to my Flow is an BLOB message (This is must).
2. In later stage of my flow, I have to convert this BLOB into XML and validate this XML with the corresponding XSD.
Option1:
1. I used Compute Node and used ESQL to construct the XML with the following statement.
----------------------
SET MsgSetChr = 'S8032GG002099';
SET MsgTypeChr = 'TESTXML';
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(InputRoot.BLOB.BLOB SET MsgSetChr TYPE MsgTypeChr OPTIONS ValidateValue + ValidateContent);
----------------------
There is no MQOutput Node in my flow. The test flow has one MQInput Node, followed by this compute node and then by a trace node. I have also set the validate property of the compute node to 'Content and Value' and 'Failure Action' property as 'Exception'.
I expect, the validation should happen when the PARSE statement gets executed and exception should be raised.
I have tried with the following code also, Could not validate the XML message.
----------------------
SET MsgSetChr = 'S8032GG002099';
SET MsgTypeChr = 'TESTXML';
SET OutputRoot = InputRoot;
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(OutputRoot.BLOB.BLOB SET MsgSetChr TYPE MsgTypeChr OPTIONS ValidateValue + ValidateContent);
----------------------
If I include an MQOutput Node to the end of the flow, then the validation is getting done. Is there any option to validate an XML message in Compute Node without having MQOutput Node. |
|
Back to top |
|
 |
aq |
Posted: Sun Feb 13, 2005 9:28 pm Post subject: |
|
|
Apprentice
Joined: 20 Dec 2001 Posts: 47
|
Hi,
Two suggestions:
1. WBIMB help for the "CREATE statement" speaks something about failure action options for CREATE, where the default option is ValidateUserTrace (could your validation error have gone in usertrace ?)
" Validate failure action options...
ValidateException
ValidateLocalError
ValidateUserTrace
"
2. If the above didn't help, then you could try another Compute node after the "CREATE" compute node, where validation is turned on and with following ESQL "DECLARE t REFERENCE TO InputBody.*[<];" I have understood that this would force the parsing of entire msg tree (like in MQOutput).
Regards,
aq |
|
Back to top |
|
 |
sri |
Posted: Mon Feb 14, 2005 10:02 am Post subject: |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
Thanks
It is working fine inside the compute node itself. |
|
Back to top |
|
 |
sri |
Posted: Tue Apr 05, 2005 10:53 am Post subject: |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
Hi
This issue is not yet solved. It is working for me since I had a Trace node in my flow and I was printing ${Root} from the trace node. The XML was getting validated at this point.
Now, when I removed the trace node, still getting the same issue in validating the XML input message.
My requirement is to validate the XML message using imported schema (as MRM) in compute node. I used ESQL to validate the XML message by parsing them. The statement is as follows
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM') PARSE(InMsgBlob SET MsgSetChr OPTIONS ValidateValue + ValidateContent + ValidateException);
The problem I face is
1. The actual validation of MRM is taking place only at the MQOutput Node or Trace node (with ${Root} in it). ie The Root evaluvation happens only at the Trace/MQOutput Node.
2. As you said, I tried 'DECLARE t REFERENCE TO InputBody.*[<];' option also. Still facing the same issue.
Is there any way by which I can validate the XML message within a compute node without using Trace/MQOutput node. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 05, 2005 11:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
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
|
|
|
|