|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Auto-generating fields thru MRM |
« View previous topic :: View next topic » |
Author |
Message
|
lung |
Posted: Tue Oct 22, 2002 1:54 am Post subject: Auto-generating fields thru MRM |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Let say I have an XML message coming in as...
<XML>
<B>abc</B>
</XML>
I want to convert this XML to fixed format, so I'm using MRM. However in my MRM, I defined it as...
FieldA: max length = 3
FieldB: max length = 3
The reason is because I want my output message to be ' abc' (notice the 3 empty spaces in front of 'abc'). However, MRM will not automatically generate a field not found in the input message, instead, it will throw an exception.
I understand that if my input message is...
<XML>
<A></A>
<B>abc</B>
</XML>
Then my flow will work and my output will be ' abc', but this is just an example. In reality, my output message consists of dozens of fields which is not found in the input message, so it is not feasible if I am to manually define all the extra fields in a compute node, although it can be done.
When a message is parsed from xml to mrm (or vice versa), WMQI has the ability to pad empty spaces in a field, but does it has the ability to generate fields which is not found in xml but in the mrm?
Thanks all! _________________ lung |
|
Back to top |
|
 |
JLRowe |
Posted: Tue Oct 22, 2002 3:57 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You can use default values in MRM. Create an element value with 3 spaces, attach it to the element with a role of default value. |
|
Back to top |
|
 |
lung |
Posted: Tue Oct 22, 2002 4:39 pm Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
It works! Thanks loads jlrowe!  _________________ lung |
|
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
|
|
|
|