Posted: Wed Jul 30, 2008 5:15 am Post subject: Learning with IA96
Knight
Joined: 25 Aug 2006 Posts: 589
I am learning how to model a TDS message with IA96.
I imported the message set mrm60ms1 into my WMB V60 workspace and create a message flow following the instruction in MRM61
The input message used is also provided with IA96
1AAAABBBBBCCCD
2XXYY111ZZWW
2XXYY222ZZWW
1AAAABBBBBCCCD
2XXYYZZ333WW
2XXYYZZ444WW
2XXYYZZ555WW
2XXYYZZ666WW
But I am getting error saying that
The bit stream of the message being parsed by the MRM parser is larger than expected for a message of this message type.
Is there anything I have to change to get IA96 samples to work on WMB V60?
OK - that must be seriously annoying. IA96 is supposed to show you how to do it
I suspect that the parser is stopping after the first line. You can check that by truncating the input message after the first line. I don't have time to try out the support pack myself, but please post again if you cannot make progress.
The message definition mrm61.msxd is as follow
message61 of complexType61 which contains 2 elements
localElement611 of complesType611
localElement612 of complesType612
localElement611 and localElement612 contain simples elements describing (Tagged fixed length records)
1AAAABBBBBCCCD (let me call it RecType1) and 2XXYY111ZZWW (let me call it RecType2)
complexType61 has min occur = 1 and max occur = 1 and local group composition = sequence
complexType611 has min occur of 1 and max occur of -1
complexType612 has min occur of 1 and max occur of -1
My test results shows
No problem if input message contains 1 to many RecType1
No problem if input message contains 1 to many RecType2
No problem if input message contains 1 RecTpe1 and 1 RecType2
I got bit "stream larger than expected" when the Input message contains 1 Rectype1 and 2 Rectype2 or 2 RecType2 and 1 Rectype1.
This seems that something is mssing to tell the parser that a mix of RecType1 and RecType2 can repeat within the message.
Any help ?
This seems that something is mssing to tell the parser that a mix of RecType1 and RecType2 can repeat within the message.
Exactly. And it is easy to see where the message definition is incorrect. It defines the message as 'unbounded occurrences of localElement611 followed by unbounded occurrences of localElement612'. The 'followed by' is implied by the use of 'sequence'.
All you need to do is change the message definition to be a repeating choice of localElement611 and localElement612 ( change sequence to choice, and set maxOccurs = -1 ).
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