Author |
Message
|
PEPERO |
Posted: Thu Jan 22, 2015 12:44 am Post subject: Embeded choices problem |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Hi all;
I've defined a message type as follows :
Quote: |
Messages: msg_messagefromglobaltype type:element5
Types:
element1 is a complex type inwhich "composition" is set to "sequence"
element2 is a complex type inwhich "composition" is set to "sequence"
element3 is a complex type inwhich "composition" is set to "sequence"
element4 is a complex type inwhich "composition" is set to "choice" and the childs are element1 or element2(One of these)
element5 is a complex type inwhich "composition" is set to "choice" and the childs are element3 or element4 (One of these)
|
the problem is that the message broker can choose one of the element3 or element4 but it expects to receive a record length of length(element1) + length(element2).
when eliminating element2 from the complex type element4 everything goes right and the parser can resolve the MRM tree to element 3 or element 4 as requested by the programmer.
Please help me. |
|
Back to top |
|
 |
shanson |
Posted: Thu Jan 22, 2015 2:59 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Firstly what release of broker are you running?
Secondly, what do you mean by "but it expects to receive a record length of length(element1) + length(element2).". What is causing it to expect that? |
|
Back to top |
|
 |
PEPERO |
Posted: Fri Jan 23, 2015 9:50 pm Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Quote: |
Firstly what release of broker are you running?
|
I use WMB with effective level 7.0.0.7 under Z/OS.
Quote: |
what do you mean by "but it expects to receive a record length of length(element1) + length(element2)."
|
When having both elements 1 & 2 within element 4 an error is generated as follows :
Quote: |
BIP5181E WSMQBRK AXS05 30 A CUSTOM WIRE FORMAT ERROR HAS OCCURRED.THE MESSAGE BITSTREAM IS SMALLER THAN EXPECTED.
|
|
|
Back to top |
|
 |
shanson |
Posted: Mon Jan 26, 2015 1:50 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
An error is expected. Element 4 is a choice, it can only contain either Element1 or Element 2. It can not contain both.
It sounds like you want Element4 to contain EITHER just Element1 OR just Element2 OR both Element1 and Element2. Is that correct? |
|
Back to top |
|
 |
PEPERO |
Posted: Mon Jan 26, 2015 3:19 am Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Quote: |
An error is expected. Element 4 is a choice, it can only contain either Element1 or Element 2. It can not contain both.
|
Of Cours. Element4 is a choice and it must contain either element1 or element2.
Quote: |
It sounds like you want Element4 to contain EITHER just Element1 OR just Element2 OR both Element1 and Element2. Is that correct? |
No i don't. i want element4 to contain either element1 or element2. |
|
Back to top |
|
 |
shanson |
Posted: Mon Jan 26, 2015 4:03 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
I understand now, sorry.
Please check that element1 and element2 are the same length. CWF only supports choices where all the branches have the same length. |
|
Back to top |
|
 |
PEPERO |
Posted: Mon Jan 26, 2015 4:31 am Post subject: |
|
|
Disciple
Joined: 30 May 2011 Posts: 177
|
Thanks for this tip. No they are not. i'll check it. |
|
Back to top |
|
 |
|