Author |
Message
|
nmaddisetti |
Posted: Tue Oct 18, 2016 4:44 am Post subject: Question on Parsing XML Message using Schema |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi All,
My Environemnt is IIB10.0.0.5 on Windows
I created a Library with Schema and selected that in MQInput node Input Message Parsing tab.
and selected Parser Options Parse timing as Complete
now in compute node I am accessing xml elements and constructing another xml.
If I am sending input message with out a mandatory field... still flow is processing with out failure...
is this expected behavior ???
It is failing only if I select Validation tab Validate value as Content or Content and Value
My question is parse timing should be used in combination with Validation ???
I read the documentation from the help but I don't see any info saying these two should be used together.
Any inputs are greatly appreciated
Thanks,
Venkat. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 18, 2016 5:14 am Post subject: Re: Question on Parsing XML Message using Schema |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nmaddisetti wrote: |
If I am sending input message with out a mandatory field... still flow is processing with out failure...
is this expected behavior ??? |
Yes.
nmaddisetti wrote: |
It is failing only if I select Validation tab Validate value as Content or Content and Value |
So what you're saying is that if you tell broker not to validate the input, it doesn't validate the input? This surprises you and you're asking if this is the expected behavior?
nmaddisetti wrote: |
My question is parse timing should be used in combination with Validation ??? |
Of course. The parsing style controls when (or if) and error is thrown. Consider the situation where there's a mandatory field towards the end of an XML document which you don't use in your processing. The XML you get often doesn't contain the tag because the upstream provider is an idiot. By using content validation and on demand parsing, you can still process the XML and obtain errors for relevant tags.
nmaddisetti wrote: |
I read the documentation from the help but I don't see any info saying these two should be used together. |
There's probably no documentation saying you have to double click the Toolkit icon to start it either.
It's fairly self evident that validation can only be performed on those parts of the XML which IIB has parsed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
timber |
Posted: Tue Oct 18, 2016 5:15 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
|
Back to top |
|
 |
nmaddisetti |
Posted: Tue Oct 18, 2016 5:41 am Post subject: |
|
|
Centurion
Joined: 06 Oct 2004 Posts: 145
|
Hi Vitor and Timber,
Thank you for your reply.
Now I am very much clear...seems I remember something wrong about parse timing all these years...
and just to add to this if we don't enable Validation then what ever parse timing option we select just checks XML is well-formed XML or not.
that is what I understand now from the link given by Timer
http://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ad67020_.htm
Please comment if the above statement is not right about parse timing.
Thanks,
Venkat. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 18, 2016 5:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nmaddisetti wrote: |
and just to add to this if we don't enable Validation then what ever parse timing option we select just checks XML is well-formed XML or not. |
The XMLNSC parser will always object to badly formed XML. When it attempts to parse it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|