Author |
Message
|
alastor52 |
Posted: Tue Jun 24, 2008 11:00 am Post subject: MQGet Question |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
I have a message waiting in a queue that looks something like this:
<message>
<value1>value</value1>
<list1>
<item1>item</item1>
</list1>
</message>
And I pass a message that looks something like this into an MQGet node:
<message>
<value2>value</value2>
<list1>
<item2>item</item2>
</list1>
</message>
Now the resulting XML looks like this:
<message>
<value1>value</value1>
<value2>value</value2>
<list1>
<item1>item</item1>
</list1>
</message>
I was expecting to see both 'items' in the <list1> list. How come the MQGet node is only combining the messages at the top level and not in the child nodes? What do I have configured incorrectly? I am using the MRM message domain.
Thanks!  |
|
Back to top |
|
 |
nagarjun_vv |
Posted: Tue Jun 24, 2008 10:44 pm Post subject: |
|
|
Apprentice
Joined: 24 Jun 2008 Posts: 33
|
It depends on the value you configured in the mqgetnode (result and output data location) |
|
Back to top |
|
 |
alastor52 |
Posted: Wed Jun 25, 2008 4:33 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
nagarjun_vv wrote: |
It depends on the value you configured in the mqgetnode (result and output data location) |
Message domain: MRM
Message set: xform_message_set
Message type: Message
Message format: XML1
Parse timing: On Demand
Transaction mode: Yes
Generate mode: Message
Copy message: Copy Entire Message
Ouput data location: OutputRoot.MRM.message
Result data location: ResultRoot.MRM.message
My message is defined as:
<message>
<value1/>
<value2/>
<value3/>
<value4/>
<list1>
<item1/>
<item2/>
<item3/>
<item4/>
</list1>
</message>
Let me know if you need anything else.  |
|
Back to top |
|
 |
crossland |
Posted: Wed Jun 25, 2008 4:49 am Post subject: |
|
|
Master
Joined: 26 Jun 2001 Posts: 248
|
This isn't all that clear.
Are you saying that you are getting two different messages?
Also, what does your message flow look like and have you written any ESQL?
Tim
http://www.inspirotechnic.com |
|
Back to top |
|
 |
alastor52 |
Posted: Wed Jun 25, 2008 5:26 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
crossland wrote: |
This isn't all that clear.
Are you saying that you are getting two different messages?
Also, what does your message flow look like and have you written any ESQL?
Tim
http://www.inspirotechnic.com |
My understanding of an MQGet node is that it can munge together a message coming into the node with a message waiting in a queue. There is no ESQL involved with an MQGet node (that I'm aware of).
So, waiting in the queue is this message:
<message>
<value1>value</value1>
<list1>
<item1>item</item1>
</list1>
</message>
And then into the MQGet node I pass this message:
<message>
<value2>value</value2>
<list1>
<item2>item</item2>
</list1>
</message>
Now, based on my knowledge of how an MQGet node works, I exepected the output to be:
<message>
<value1>value</value1>
<value2>value</value2>
<list1>
<item1>item</item1>
<item2>item</item2>
</list1>
</message>
However, the output of the MQGet node is actually:
<message>
<value1>value</value1>
<value2>value</value2>
<list1>
<item1>item</item1>
</list1>
</message>
The top level elements are being merged, however the children of the <list1> element are being overwritten instead of merged. I'm trying to figure out how to get the child elements to be merged together as well. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jun 25, 2008 6:34 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
If you are using V6.1 then it is easy to use the collector node.
I have just written a message flow that combines the data from two MQ messages on different queues.
Two MQinput nodes, One Collector node, I compute node and an MQ Output node + Error Handling naturally.
/Steve D _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
alastor52 |
Posted: Wed Jun 25, 2008 6:48 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
smdavies99 wrote: |
If you are using V6.1 then it is easy to use the collector node.
I have just written a message flow that combines the data from two MQ messages on different queues.
Two MQinput nodes, One Collector node, I compute node and an MQ Output node + Error Handling naturally.
/Steve D |
Wow, that sounds like exactly what I need. Unfortunately I'm using V6.0
Hopefully there is a way to do this other than a brute force approach. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jun 25, 2008 9:18 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
A nice excuse to upgrade then?
 _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
alastor52 |
Posted: Wed Jun 25, 2008 9:31 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
smdavies99 wrote: |
A nice excuse to upgrade then?
 |
That depends on if the upgrade cost fits into our non-existant budget. Otherwise I'll have to figure out another solution.  |
|
Back to top |
|
 |
vsr |
Posted: Wed Jun 25, 2008 10:08 am Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
nagarjun_vv wrote: |
It depends on the value you configured in the mqgetnode (result and output data location) |
MQGet node can merge the input tree message with the result root from mqget depending on the parameters you set in the mqget node 'Result' tab like 'nagarjun_vv' said.
IBM Information center explained it very well.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac34680_.htm
If you want to merge the request message with mqget message, you can set valid field reference value for 'Output data location' (under 'Result' tab) for example 'Environment.Variables.MQGetMessage'. When the mqget node parses the message it stores the message under the field set ( 'Environment.Variables.MQGetMessage' in this case). You can manipulate from there. Make sure that 'Copy message' under 'Advanced' tab is set to 'Copy Entire Message'. |
|
Back to top |
|
 |
|