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 » Want to receive Exception message with original message

Post new topic  Reply to topic
 Want to receive Exception message with original message « View previous topic :: View next topic » 
Author Message
abs_cal
PostPosted: Wed Aug 06, 2008 12:34 pm    Post subject: Want to receive Exception message with original message Reply with quote

Acolyte

Joined: 18 Aug 2005
Posts: 62

Trying to get the Exception message/list with original message while any error occurs inside a message flow. Can anyone help me to understand what need to be done in order to capture/get exception list in a queue?

Thanks in advance.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Aug 06, 2008 7:45 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

In that case you need to make exceptionList tree structure a part of your msg payload... since MQ gets nly payload with headers..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
vaibhav_vy
PostPosted: Wed Aug 06, 2008 10:02 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 28

To be very specific, always attach compute node to Catch terminal of Input node such as MQInput, HTTPInput etc used in your message flow. This will ensure that even if you get exception anywhere in message flow, it will be caught and control is transferred to Catch terminal of Input node unless you catch exception using TryCatch nodes. Once control is transferred, you can write specific code to handle that exception. To solve your issue, copy input message & ExceptionList to output message. For example, if u are using XMLNSC parser, use can use code like,
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;

If u are making changes to Input data & want original message, save first it to Environment immediately after you get the request so that you can later retrieve it like,
SET Environment.Variables.InputMessage = InputBody ;

& in exception handling retrieve it using,
SET OutputRoot.XMLNSC.OriginalMessageData = Environment.Variables.InputMessage ;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Aug 06, 2008 10:58 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

vaibhav_vy wrote:
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;


Would ASBITSTREAM not be required here
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
vaibhav_vy
PostPosted: Thu Aug 07, 2008 9:09 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Aug 2008
Posts: 28

That would be require only when message domain is BLOB. For rest, above code would work fine.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Fri Aug 08, 2008 1:50 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Quote:
SET OutputRoot.XMLNSC.OriginalMessageData = InputBody;
SET OutputRoot.XMLNSC.ExceptionData = InputExceptionList;


AFAIK these create the subtree under the specified path... statements like
OutputRoot.XMLNSC.ExceptionDataData.*[1].... are required to access it further..

However if one needs the complete exceptionlist tree as one element then ASBITSTREAM and CAST is the way to go fwd..

vaibhav_vy wrote:
That would be require only when message domain is BLOB. For rest, above code would work fine.



ASBITSTREAM results the o/p as blob but the i/p is a reference to any field.. any domain and any type..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Want to receive Exception message with original message
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.