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 » How to expore ExceptionList

Post new topic  Reply to topic
 How to expore ExceptionList « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Thu Apr 14, 2005 3:27 am    Post subject: How to expore ExceptionList Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi Guys

I have a doubt regarding exception list.Suppose if i have a message which has one of its tag missing.At the time the exception is thrown by the node and exception list is populated,how would my flow know that this exception occured because of missing tag.Probably i can dig up the exception list and find out this exception occured because of missing tag.But how far i should go in the exception list tree that i get the information that exception occured due to this error.So,basically i am not getting an idea as how the code should be written to get the exact reason for exception because the exception list has numerous children and i dont know where the error message is hidden.So,does it mean that i keep on parsing each and every child of exception list.

brgmo.
Back to top
View user's profile Send private message
waugh
PostPosted: Thu Apr 14, 2005 5:57 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 225

SET OutputRoot.XML.MYException.ExceptionData = InputExceptionList;

then explore OutputRoot.XML.MYException.ExceptionData.*[1] for what you need...

for example, following code gives you the description of exception.

DECLARE start REFERENCE TO OutputRoot.XML.MYException.ExceptionData.*[1];

SET OutputLocalEnvironment.InsertData ='';

WHILE start.Number IS NOT NULL DO

MOVE start LASTCHILD;

IF start.Number IS NOT NULL
THEN

DECLARE DataCount INT;
SET DataCount =1;

DECLARE Count INT;
SET Count =1;

DECLARE CountInsert INT;
SET CountInsert = CARDINALITY (start.[]);

WHILE Count <= CountInsert DO


IF FIELDNAME(start.[Count]) = 'Insert' THEN

SET Environment.TempInsertData[DataCount] = '[Error Data Value:] '||start.[Count].Text||' ';
SET OutputLocalEnvironment.InsertData = OutputLocalEnvironment.InsertData||OutputLocalEnvironment.TempInsertData;

SET DataCount =DataCount +1;
END IF;


SET Count =Count +1;
END WHILE;

SET Environment.DescriptionData = start.Text||' - '||start.Insert[<].Text;

END IF;


END WHILE;




-- You should have your excetion description in Environment.DescriptionData, inserts in OutputLocalEnvironment.InsertData now.....


hope this helps....
Back to top
View user's profile Send private message
JT
PostPosted: Thu Apr 14, 2005 11:36 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

As you drill down the ExceptionList tree, the more specific the details will be surrounding the parsing error. So the last ParserException should provide the specifics (inserts) as to the element in error.

The supplied example from IBM does exactly that: http://publib.boulder.ibm.com/infocenter/wbihelp/topic/com.ibm.etools.mft.doc/ac16830_.htm
Back to top
View user's profile Send private message
angka
PostPosted: Sun Jan 08, 2006 7:12 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi waugh,

I tried out your code and I ve a few questions which I hope you can help me with. If my sender is a publisher and it sends a message to a few subscribers and more than one transmission queues is full I can't get all the error queues because of the LASTCHILD function. Correct me if I am wrong. The LASTCHILD function will get to the last child of the parent and if my xml error structure consists of more than one error, I will only be able to get the last error. I tried out using NEXTSIBLING, PREVIOUSCHILD function but it still don't work for me. Is there any simpler way to get all the error queues?? Thank you in advance.

Rgds.
Back to top
View user's profile Send private message
angka
PostPosted: Tue Jan 10, 2006 6:10 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Can anyone help? Thanks

Rgds.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Jan 10, 2006 10:22 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi angka,

It took me some time to figure out what u wanted....i'm still not sure

Anyway, if your problem is that you are getting multiple complex tags(with insert tags) in every previous complex type and you want to go to each one of these complex types, then

MOVE start NEXTSIBLING should work....

Why dont you paste the Error message you have, indicating what all fields you want to pick and also the code you have tried.

Regards.
Back to top
View user's profile Send private message Send e-mail
aks
PostPosted: Thu Jan 12, 2006 9:11 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jul 2002
Posts: 84

Try this

Code:
CREATE PROCEDURE writeExceptions(INOUT errorRef REFERENCE, IN exceptionRef REFERENCE)
BEGIN
  DECLARE path CHARACTER '';
  DECLARE start REFERENCE TO exceptionRef.*[1];
 
  -- Loop through the exception list children
  WHILE (start.Number IS NOT NULL) DO
    SET path = path || COALESCE(start.Text, '') || ' - ' || COALESCE(start.Insert[<].Text, '');
   
    -- Move start to the last child of the field to which it currently points
    MOVE start LASTCHILD;
  END WHILE;
 
  SET errorRef."ErrorText" = path;
END;


errorRef is a node where errors are written, and exceptionRef is a reference to InputExceptionList
Alan
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Jan 12, 2006 9:28 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi aks,

You created a procedure out of the second while which waugh posted...

But this is not the problem which angka is facing I think else the previous code should have worked.

Regards.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Jan 13, 2006 4:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think, since the original post was from April of last year, that angka is not still looking for an answer.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sun Jan 15, 2006 8:26 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

jeff:

Her last post saying

Quote:
Can anyone help? Thanks


Was on Jan 11-2006

Regards.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Jan 16, 2006 6:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981



I missed that someone hijacked the thread.
_________________
I am *not* the model of the modern major general.
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 » How to expore ExceptionList
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.