|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Big MRM to XML |
« View previous topic :: View next topic » |
Author |
Message
|
WBI_user |
Posted: Mon Oct 29, 2001 10:13 pm Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
I have a big MRM output with a few hundred fields which I need to convert to XML. I just feed the out terminal of the compute node which poroduce this big MRM message to the input of a second compute node ans perform a tree copy with :
SET "OutputRoot".Properties.MessageFormat = 'XML' ;
I got a big XML message as the output with this one statement.
The output big XML is like:
<?xml version="1.0"?>
<MRM xmlns="www.mrmnames.net/DMPRK8G082001">
<MSG1>
<ST_DATA_2>ABCDE</ST_DATA_2>
<ST_DATA_1>1234567890</ST_DATA_1>
:
:
</MSG1>
</MRM>
But my customer wants me to select only 20 field out of the big XML and change this name of the tags. So I feed the output terminal of this 2nd compoute node which produce the big XML to the input terminal of a 3rd compute node and use the statement:
SET OutputRoot.XML.NEWTAG.DATA1=InputRoot.MRM.MSG1.ST_DATA_2;
However this result in an error saying the unexpected NULL is detected. In the trace
it shows failed to nevigate to path
InputRoot.MRM.MSG1.ST_DATA_2
I am a little confused. Does it mean that
SET "OutputRoot".Properties.MessageFormat = 'XML' will not build a message tree which can be passed to the next node ?
If that is the case, is there a way to avoid building MRM to XML ESQL for the several hundred field of my big MRM ?
Or is there a utility to help me to do that ? |
|
Back to top |
|
 |
bh |
Posted: Mon Oct 29, 2001 11:54 pm Post subject: |
|
|
Acolyte
Joined: 25 Jun 2001 Posts: 61
|
Have you define your second message format in the MRM or do you want to use the generic XML parser ? Because, if it's the case, I think you'll have to had a RCD node (or had eSQL sentences in a compute node. From my point of view, in your node, you are still using a descriptin tree based on the MRM. Try using a trace node and see what's inside... |
|
Back to top |
|
 |
WBI_user |
Posted: Tue Oct 30, 2001 7:59 pm Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
I specified MRM on the input side of the compute node only, nothing on the output side. and just use copy entire message and
SET "OutputRoot".Properties.MessageFormat = 'XML' ; to generate the big XML message. The XML tags are automatically set to the MRM field name.
I tried use RCD to reset it to XML. However when I check XML , it expects a begin XML tag and an end XML tag because the default XML parser expects well formed XML.
These big XML output is then feed to the next compute node where I use the
SET OutputRoot>XML...= InputRoot.XML...
to change the tag name on the 20 fields that cusotmer wants.
I think the XML message was just being build dynamically and no tree was built inside the node and hence the subsequent compute node encounters NULL.
I think , I have to go back and code SET OutputRoot.XML....for every field of my large MRM message.
|
|
Back to top |
|
 |
Miriam Kaestner |
Posted: Thu Nov 01, 2001 2:29 am Post subject: |
|
|
Centurion
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
|
If you need only 20 fields out of the large MRM msg, you could just simply use 1 compute node with "Copy msg headers only" and 20 statements like this:
SET OutputRoot.XML.NEWTAG.DATA1=InputRoot.MRM.MSG1.ST_DATA_2;
Don't forget for XML there must only be 1 root element - in this case, NEWTAG. |
|
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
|
|
|
|