ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Parser Exception

Post new topic  Reply to topic
 XML Parser Exception « View previous topic :: View next topic » 
Author Message
pratuluv
PostPosted: Mon Sep 16, 2013 11:31 pm    Post subject: XML Parser Exception Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

I have a very basic question. I am using a MQInput Node and the Input Message parsing is set to XMLNSC.

Now I am passing an Invalid XML (not a well formed XML) as input.

I have connected the failure terminal to FAILURE Q. I expected WMB to throw an error as the input is not a valid XML but it doesn't throw any error.

I am using WMB 8.0.0.2. Is this behaviour normal
Back to top
View user's profile Send private message
Tibor
PostPosted: Mon Sep 16, 2013 11:51 pm    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

Have you already checked the entries in syslog (Unix) or event viewer (Windows)?
Back to top
View user's profile Send private message
Esa
PostPosted: Mon Sep 16, 2013 11:55 pm    Post subject: Re: XML Parser Exception Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

pratuluv wrote:
Is this behaviour normal


Yes. By connecting the failure terminal you are giving the broker instructions how to handle failed messages. Put a breakpoint or a trace node after the failure terminal and examine the exception list.

And, as Tibor pointed out, there should be something in the system log, too.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Mon Sep 16, 2013 11:57 pm    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

To explain it further,

I have a MQInput node ---> Compute Node ---> MQOuput Node.

I am just saying SET OutputRoot = InputRoot; in Compute Node.

The Failure terminal is connected to another MQOutput Node. So in case of Invalid XML, I expect broker to take the failure path but instead, the borker takes the out path and the message is sent to the Output Queue.
Back to top
View user's profile Send private message
pratuluv
PostPosted: Tue Sep 17, 2013 12:00 am    Post subject: Re: XML Parser Exception Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

Esa wrote:
pratuluv wrote:
Is this behaviour normal


Yes. By connecting the failure terminal you are giving the broker instructions how to handle failed messages. Put a breakpoint or a trace node after the failure terminal and examine the exception list.

And, as Tibor pointed out, there should be something in the system log, too.


My point is Broker is not taking the failure path. It is processing the Invalid XML as any other good message and sending to the Output Queue and not the failure Q.
Back to top
View user's profile Send private message
Simbu
PostPosted: Tue Sep 17, 2013 12:07 am    Post subject: Re: XML Parser Exception Reply with quote

Master

Joined: 17 Jun 2011
Posts: 289
Location: Tamil Nadu, India

pratuluv wrote:
Esa wrote:
pratuluv wrote:
Is this behaviour normal


Yes. By connecting the failure terminal you are giving the broker instructions how to handle failed messages. Put a breakpoint or a trace node after the failure terminal and examine the exception list.

And, as Tibor pointed out, there should be something in the system log, too.


My point is Broker is not taking the failure path. It is processing the Invalid XML as any other good message and sending to the Output Queue and not the failure Q.


I think in your MQInput node Parse Timing property set to On Demand.

Quote:
On Demand causes partial parsing to occur. When fields in the message are referenced, as much of the message is parsed as is necessary to completely resolve the reference. Therefore, fields might not be parsed until late in the message flow, or never. This restriction applies to both the message body and the message headers.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/topic/com.ibm.etools.mft.doc/ac20814_.htm
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Sep 17, 2013 12:13 am    Post subject: Re: XML Parser Exception Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Simbu wrote:

I think in your MQInput node Parse Timing property set to On Demand.


Exactly. If you do
Code:
SET OutputRoot = InputRoot;

the message is not necessarily parsed. It can be copied as a BLOB if you haven't touched any fields yet.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Tue Sep 17, 2013 2:15 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

pratuluv wrote:
I have a MQInput node ---> Compute Node ---> MQOuput Node.

I am just saying SET OutputRoot = InputRoot; in Compute Node.

The message flow won't parse the message unless it has to. In this case, the message flow can pass the unparsed bitstream from input to output.

pratuluv wrote:
The Failure terminal is connected to another MQOutput Node. So in case of Invalid XML, I expect broker to take the failure path ...

Even if the parser threw an exception, the message flow would either route it to the Catch terminal, or back to the input queue, not to the Failure terminal. If the message flow does route the message to the Failure terminal, it would be for some other reason, (such as Backout Threshold exceeded).
Back to top
View user's profile Send private message
pratuluv
PostPosted: Tue Sep 17, 2013 2:19 am    Post subject: Reply with quote

Acolyte

Joined: 25 May 2011
Posts: 53

Thanks everyone. I got it.

1. The parser option is On Demand so I tried changing it to Complete / Immediate and it throws an exception.

2. I kept the parser option as On Demand and added one more line of code in ESQL as below. It throws parser exception as expected.

Set OutputRoot = InputRoot;
Set OutputRoot.XMLNSC = InputRoot.XMLNSC;

Thanks for all your inputs and guidance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Parser Exception
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.