Author |
Message
|
neo_revolution |
Posted: Tue Feb 24, 2004 11:38 am Post subject: Handling invalid XML |
|
|
Voyager
Joined: 21 Oct 2003 Posts: 80 Location: NJ
|
My input is XML message. I am connecting the MqInput nodes' failure terminal to a compute node, so that I can handle the invalid xml messages.
But it seems not working, my sample invalid exception is not going to failure terminal. How can I handle invalid XML in the MQInput node |
|
Back to top |
|
 |
kirani |
Posted: Tue Feb 24, 2004 12:03 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you at CSD3 or greater level then you can use "Validate" option in MQInput node to capture invalid XML messages.
WMQI uses lazy parsing so your message tree will be build when you reference to it. In your current scenario your xml is not getting parsed at all. IF you add a trace node and print ${Root} into it the parser will then throw an exception for invalid XML messages. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
neo_revolution |
Posted: Tue Feb 24, 2004 12:11 pm Post subject: |
|
|
Voyager
Joined: 21 Oct 2003 Posts: 80 Location: NJ
|
Hi Kiran,
What we are doing is that, if we get any invalid xml, ie not properly formatted or invalid tags we need to create a response and send back.
I connected the 'catch' terminal of the MQInput node then the msg is going to catch terminal.
I wonder why can't it go to failure terminal?
I am at CSD03 and i tried 'Validate' option also with out much luck...
Thanks |
|
Back to top |
|
 |
jfluitsm |
Posted: Wed Feb 25, 2004 11:28 pm Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
The catch terminal is the one you should use in your situation.
The failure terminal is used when the backout-count is equal to or grater then the backout threshold. As this is detected straight after the MQGET there is no error information. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
neo_revolution |
Posted: Fri Feb 27, 2004 8:02 pm Post subject: |
|
|
Voyager
Joined: 21 Oct 2003 Posts: 80 Location: NJ
|
Hello jfluitsm,
I tried that and worked for me. Thanks a lot. |
|
Back to top |
|
 |
|