|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQSI XML Attribute to tags and values : Using MQGet Node |
« View previous topic :: View next topic » |
Author |
Message
|
Paul D |
Posted: Mon Feb 25, 2002 9:07 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
I'm using the MQGet node plugin. For those of you familiar with this, I'm trying use that this node places into my message back into the rest of my XML. To explain further, the MQGet node returns the message data back as a tag attribute to a place you designate in the XML tree. My message data is XML and I'd like to get this converted from this attribute value into useful XML in my message. It looks something like this...
<TrustPremiumTransaction DataFromMQGETNode="<TagOne>tagonedata</TagOne><TagTwo>tagtwodata</TagTwo>"><OrigTagData1>someorigdata1</OrigTagData1><OrigTagData2>someorigdata2</OrigTagData1></TrustPremiumTransaction>
You can see the message from the MQGet node is a string in the DataFromMQGETNode attribute of the TrustPremiumTransaction tag. I'd like to that that data out of there place it somewhere in the tree as real tags that I can use. Get the idea? I'm hoping that some else has run into this. Most likely someone who's trying to use the MQGet node in a similar manner that I am.
Thanks in advance for your help....
Paul Dix
Northwestern Mutual
I.S.-Middleware Tech Support |
|
Back to top |
|
 |
kirani |
Posted: Mon Feb 25, 2002 5:55 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Paul,
What did you type in "Message Tree Location"? Probably you are getting your data in "" because you are retrieving data as STRING. You can try retriving data from queue as BLOB. Do you need your input message for further processing? If not, you can retrieve your data into Root."BLOB"."BLOB" and use RCD to convert it into XML message.
Regards,
Kiran
|
|
Back to top |
|
 |
Paul D |
Posted: Tue Feb 26, 2002 8:21 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
Yes, I'd like to combine the existing message with the message data I'm getting from the MQGet node's queue. Is there any way to use Blob and RCD to roll the existing message and this from the MQGet node together? I know I can use Substrings to deal with the string of data I get back, but this is a bad way to get back to the fields and defeats the flexability of the XML format which I'm originally starting with in the first place. |
|
Back to top |
|
 |
kirani |
Posted: Tue Feb 26, 2002 9:20 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Paul,
Thread at url http://www.mqseries.net/phpBB/viewtopic.php?topic=1763&forum=7&5 talks about combining XML messages from Database. You could use similar kind of logic to combine your messages. You can store your original XML/BLOB message into DestinationList and in the following compute node after MQGet node prepare new output message.
Kiran
|
|
Back to top |
|
 |
Paul D |
Posted: Tue Feb 26, 2002 11:04 am Post subject: |
|
|
 Master
Joined: 16 May 2001 Posts: 200 Location: Green Bay Packer Country
|
Thanks, that reference to that other post was just what I needed. Here's a quick review for anyone else trying to follow this. I now used a BLOB instead of string for the message I'm getting back from the MQGet node. I place that in InputRoot.TEMP.DATA. That next step is to wrap these two XML statements (original msg as a blob and from MQGet node as a blob) into one by concatenating a start and end tag around them to make one higher level. After this compute, just pass it through a "Reset Content Descriptor" node with the Message Domain set to XML and it's reset box checked. Reading the other post completely will fully explain it.
-- Create starting and ending TRANS tags to wrap both XML statements into one.
-- Passing this through resent content descriptor next will produce valid XML.
DECLARE DummyHeaderStartTag BLOB;
DECLARE DummyHeaderEndTag BLOB;
SET DummyHeaderStartTag = x'3c5452414e533e';
SET DummyHeaderEndTag = x'3c2f5452414e533e';
SET OutputRoot."BLOB"."BLOB" = DummyHeaderStartTag || InputRoot."BLOB"."BLOB" || InputRoot.TEMP.DATA || DummyHeaderEndTag;
Thanks so much for your help!!! |
|
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
|
|
|
|