Author |
Message
|
mbsa |
Posted: Fri May 16, 2014 11:41 am Post subject: exception in debug mode |
|
|
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 |
|
 |
fjb_saper |
Posted: Fri May 16, 2014 12:43 pm Post subject: |
|
|
 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 |
|
 |
mbsa |
Posted: Sat May 17, 2014 3:54 am Post subject: |
|
|
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 |
|
 |
kimbert |
Posted: Sat May 17, 2014 12:40 pm Post subject: |
|
|
 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 |
|
 |
mbsa |
Posted: Sun May 18, 2014 4:36 pm Post subject: |
|
|
Apprentice
Joined: 04 Mar 2013 Posts: 41
|
|
Back to top |
|
 |
mbsa |
Posted: Thu May 22, 2014 12:46 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu May 22, 2014 3:32 pm Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Fri May 23, 2014 1:18 am Post subject: |
|
|
 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 |
|
 |
mbsa |
Posted: Wed May 28, 2014 4:25 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed May 28, 2014 12:37 pm Post subject: |
|
|
 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 |
|
 |
ganesh |
Posted: Wed May 28, 2014 3:18 pm Post subject: |
|
|
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 |
|
 |
mb01mqbrkrs |
Posted: Thu May 29, 2014 1:48 am Post subject: |
|
|
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 |
|
 |
|