|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MRM CWF modeling |
« View previous topic :: View next topic » |
Author |
Message
|
wmb6102 |
Posted: Thu Jul 17, 2008 7:35 pm Post subject: MRM CWF modeling |
|
|
Newbie
Joined: 17 Jul 2008 Posts: 2
|
Hi, I need to model a message contains length encoded field, ex: H0008BDA, where H is the prefix, followed by length field represents whole message(0008 chars in total) and then BDA is the body. I tried to model CWF and defined 3 fields as follows.
MessageHeader char(1)
MessageLength int (4 bytes)
MessageBody char(length referenced as Messagelength with InclusiveLengthReferece flag selected).
But the problem is, MessageLength field represents the complete length of the message, so WMB is trying to get 4 chars of body instead of 3 chars, which is incorrect length.
I have also tried defining length field 5 bytes including header character and tried to ignore header char when computing the length (using pad char), but my application requires to parse the header element. So that didn't work.
Any other ways to model this message?
Thanx |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 17, 2008 8:24 pm Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
You might want to reconsider if you want to make H an element. See if you can make it a tag (in which case you might want to consider using TDS)
You probably shouldn't be modeling the length element either. If you model this as TDS, it is possible to model length encoded strings. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Jul 18, 2008 12:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
wmb6102 |
Posted: Sun Jul 20, 2008 8:26 pm Post subject: |
|
|
Newbie
Joined: 17 Jul 2008 Posts: 2
|
Thank you so much for your replies, I tried with TDS modeling, setting "length of tag" to 1, "length of Encoded Length" to 4 and "Extra chars in encoded length" to 5, expecting WMB to compute length of body to 3 chars (8-5=3). But I am getting following error (BTW, I am on WMB 6.1.0.2).
-----------
( WMBBR.default ) The bitstream of a TDS message contains less data than expected.
The TDS parser could not complete parsing because the bitstream contains less data than expected. This could be caused by either an incorrect value for the Length property in the message definition, or by an inconsistent value inside a LengthRef field.
Make sure that the incoming message is a consistent message under the TDS message definition.
----------------- |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 21, 2008 4:03 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
BTW, I am on WMB 6.1.0.2 |
That explains your user name, then
Quote: |
The bitstream of a TDS message contains less data than expected |
Please tell me that you have already taken a debug-level user trace while parsing a message. If not, please do it now.
btw, have you tried adding a couple of characters onto the end of your message, just so that you can see the message tree that the parser is trying to build? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 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
|
|
|
|