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 » exception in debug mode

Post new topic  Reply to topic
 exception in debug mode « View previous topic :: View next topic » 
Author Message
mbsa
PostPosted: Fri May 16, 2014 11:41 am    Post subject: exception in debug mode Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 41

Hello All,
I am getting 4 copybooks and i form an xml msg with these 4 copybooks.

As a failure scenario i am sending 2 copybooks with short data length.
I am expecting them to fail and they are failing with reason too short input stream.
Code:

But if put the flow in debug and jump line after line i dont get any exception.

If i get an exception my error handling flow writes the error message for each copybook that fail in a queue.

So i see that without debug 2 msgs are in my error queue and if in debug no error msgs in queue.

I should continue to build my xml by storing info in shared variables if any of copybook fails and report in the queue the failed copybook.
Code:

And also if i send the copybook with data more than the lenght of the copy book it is not throwing an exception.Is this OK?

Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 16, 2014 12:43 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If you set parsing on demand you may never parse beyond the last element needed so if the data is short or long might not matter.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mbsa
PostPosted: Sat May 17, 2014 3:54 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 41

Thanks. I think because the parse is on demand it is not failing for long data length copybook.
Code:
But Parsing is failing with reason the data too short. But I am [b]not[/b] seeing an exception when I am in debug mode. Why is it behaving like that?
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat May 17, 2014 12:40 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Which version of WMB/IIB?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
mbsa
PostPosted: Sun May 18, 2014 4:36 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 41

I am using wmb 7.0.0.6.
Back to top
View user's profile Send private message
mbsa
PostPosted: Thu May 22, 2014 12:46 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 41

Hi ,

I am generating an xml like below.
<name>
<fname></fname>
</name>
In the schema i have <name> as optional and <fname> as mandatory.

I need to generate this xml from a copybook. I am creating <name> tag as soon as i parse the copybook.But if the fname is null in copybook the empty <name> tag schould be there and xml validation should fail. It is not happening.The xml is formated and the empty tag is being removed.

But if i put in debug and step through the code then the validation of xml is failing as the empty tags are there.

I need to retain the empty tags. I am using create statement to generate the tags.How can i retain the empty tags.

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu May 22, 2014 3:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mbsa wrote:
Hi ,

I am generating an xml like below.
<name>
<fname></fname>
</name>
In the schema i have <name> as optional and <fname> as mandatory.

I need to generate this xml from a copybook. I am creating <name> tag as soon as i parse the copybook.But if the fname is null in copybook the empty <name> tag schould be there and xml validation should fail. It is not happening.The xml is formated and the empty tag is being removed.

But if i put in debug and step through the code then the validation of xml is failing as the empty tags are there.

I need to retain the empty tags. I am using create statement to generate the tags.How can i retain the empty tags.

Thanks

Well depends on how you are generating the empty tag...
in ESQL it would be like
Code:
set OutputRoot.XMLNSC.name.fname VALUE = null;


Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri May 23, 2014 1:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your test flow is probably not triggering any parsing, because the default setting for 'Parse Timing' is 'On demand'.

Go to the Input node properties and set 'Parse Timing' to 'Immediate'.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
mbsa
PostPosted: Wed May 28, 2014 4:25 am    Post subject: Reply with quote

Apprentice

Joined: 04 Mar 2013
Posts: 41

Multiple Copybooks are converted to XML message. I cannot use parsing 'immidiate' on my input node. In my compute node i am building the xml with a create tag <name>.If the <fname> is null from Copybook then i dont see the <name> tag coming out of compute node. I am validating this xml with resetcontentdescriptor node after compute node.
It needs to fail in validation as <name> is optional but <fname> is required filed.

But if you put in debugger and step through the code it is failing in validation and i can see the empty tags <name>. Please advice.

Code:

<details>
<name>
<fname>1</fname>
</name>
<name>
<fname>2</fname>
</name>
<details>
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 28, 2014 12:37 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

either fname is nillable and then you could put in an empty tag... or you need to verify for each name, whether it has valid children... and remove it if empty...
Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ganesh
PostPosted: Wed May 28, 2014 3:18 pm    Post subject: Reply with quote

Master

Joined: 18 Jul 2010
Posts: 294

Quote:
But if you put in debugger and step through the code it is failing in validation and i can see the empty tags <name>.

Message broker was not designed to behave differently with either debugger on/off. You are missing something in your analysis.
Back to top
View user's profile Send private message
mb01mqbrkrs
PostPosted: Thu May 29, 2014 1:48 am    Post subject: Reply with quote

Apprentice

Joined: 18 Nov 2011
Posts: 48

ganesh wrote:
Message broker was not designed to behave differently with either debugger on/off. You are missing something in your analysis.


This isn't always the case
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 » exception in debug mode
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.