|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Renaming root element in MRM domain |
« View previous topic :: View next topic » |
Author |
Message
|
omatan234 |
Posted: Wed Jun 28, 2017 1:50 pm Post subject: Renaming root element in MRM domain |
|
|
Newbie
Joined: 12 Jun 2017 Posts: 8
|
I use MRM type of message in my message flow.
For some reason the OutputRoot.MRM name is set as the InputRoot.MRM name .
For example, for the Input message:
<Apple>
<orange>nynbj</orange>
</Apple>
I want to get the next Output message:
<Grape>
<orange>nynbj</orange>
</Grape>
But insted in my queue i get the next Output message:
<Apple>
<orange>nynbj</orange>
</Apple>
How can i rename my root element while using MRM ? |
|
Back to top |
|
 |
timber |
Posted: Thu Jun 29, 2017 4:54 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
One of the 'interesting' features of the MRM domain is the fact that the root element does not appear in the message tree. If you want to select a different output message, you have to set OutputRoot.Properties.MessageType (if I remember correctly).
But I would always use DFDL - much easier and simpler. And supported. |
|
Back to top |
|
 |
omatan234 |
Posted: Mon Jul 03, 2017 1:24 am Post subject: |
|
|
Newbie
Joined: 12 Jun 2017 Posts: 8
|
You are right, the root element does not appear in the message tree.
But when the new message is going out of the flow the root element is there and is named like the original InputRoot.MRM.
This is the problem, altough you can not see the root element in the flow while using the MRM type, it is still exists and appears in the queue that recives the message
I still haven't found how to change it's name.
Anybody have any idea how change it ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 03, 2017 4:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
your example shows XML. So why are you using MRM and not XMLNSC?
In order to change the root tag, you need 2 definitions in MRM and you need to change the message name.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Jul 03, 2017 11:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
omatan234 wrote: |
I still haven't found how to change it's name.
Anybody have any idea how change it ? |
One way to change the name is to ...
timber wrote: |
... set OutputRoot.Properties.MessageType ... |
Another way to change the name is to use a Reset Content Descriptor node.
The name of the root level element comes from the message that is modeled within the MRM message set itself. The Root.Properties.MessageType field identifies which message within the message set is associated with Root, either an <Apple> message, or a <Grape> message, or some other message.
If the message set does not define a <Grape> message, then the message flow can use a Reset Content Descriptor node or equivalent ESQL to switch to some other suitable domain, (such as DFDL, XMLNSC, or BLOB), and then set the name of the top-level element manually. |
|
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
|
|
|
|