Author |
Message
|
ComputeNode |
Posted: Mon Sep 30, 2013 2:05 am Post subject: Convert Incoming XML Message |
|
|
Newbie
Joined: 30 Sep 2013 Posts: 5
|
Hi All,
sorry for asking if this sounds silly question to you guys, i am new to Message Broker. we are using Message Broker v 8.0.0.2 and MQ 7.5.
i have given a new requirement to develop a message flow, In which incoming message is coming from client Subscription Flow, it is in XMLNSC format and that needs to be transformed in new format of XMLNSC . I have the XML schema of new format, but i cant understand how to do it as incoming message having less number of tags and the new format is having new xml tag and values.
Incoming XML:
Quote: |
<NS1:SapZmmContainerWrapper <SapZmmContainer>
<SapMessage>
<MSGID>86</MSGID>
<MSGTYPE>XX</MSGTYPE>
<PARTNER>XX</PARTNER>
<MSGDT>2013-09-30</MSGDT>
<MSGTM>02:34:40</MSGTM>
<FIELD1>Test</FIELD1>
<FIELD2>0000</FIELD2>
<FIELD3> 35</FIELD3>
<FIELD4> 7</FIELD4>
<FIELD5> 10</FIELD5>
<FIELD6> 0</FIELD6>
<FIELD8>X</FIELD8>
<FIELD9>0002</FIELD9>
<FIELD12>Test1</FIELD12>
<FIELD13>0</FIELD13>
</SapMessage>
</SapZmmContainer>
</NS1:SapZmmContainerWrapper> |
New Format:
Quote: |
- <HEADER>
<MSGTYPE>XXX</MSGTYPE>
<PARTNER>XX</PARTNER>
<MSGID>1284654</MSGID>
<MSGDT>20130530</MSGDT>
<MSGTM>144524</MSGTM>
</HEADER>
- <DETAIL>
- <HDR>
<FGSOURCE>0000204343</FGSOURCE>
<ZSWERKS>SSEA</ZSWERKS>
<ZPLTNAMEC>SOUTH SEA</ZPLTNAMEC>
- <DEST>
<FGDEST>ADC</FGDEST>
<PRODUCT_TYPE>COH</PRODUCT_TYPE>
</DEST>
</HDR>
</DETAIL>
</XXXX>
|
Can any please give me some help how in compute node, i will transform  |
|
Back to top |
|
 |
dogorsy |
Posted: Mon Sep 30, 2013 2:40 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
you need to ask the person who gave you the requirement. The requirement should contain a section with the mappings/logic necessary to achieve the output. |
|
Back to top |
|
 |
ComputeNode |
Posted: Mon Sep 30, 2013 2:49 am Post subject: |
|
|
Newbie
Joined: 30 Sep 2013 Posts: 5
|
Can i use XSL Transformation node to achieve the requirement ? |
|
Back to top |
|
 |
dogorsy |
Posted: Mon Sep 30, 2013 3:03 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
ComputeNode wrote: |
Can i use XSL Transformation node to achieve the requirement ? |
What does the documentation in the InfoCenter says ? |
|
Back to top |
|
 |
Tibor |
Posted: Mon Sep 30, 2013 3:19 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
ComputeNode wrote: |
Can i use XSL Transformation node to achieve the requirement ? |
Yes. |
|
Back to top |
|
 |
ComputeNode |
Posted: Mon Sep 30, 2013 3:24 am Post subject: |
|
|
Newbie
Joined: 30 Sep 2013 Posts: 5
|
InfoCentre Says:
Quote: |
XSLTransform node
Use the XSLTransform node to transform an XML message to another form of message, according to the rules provided by an XSL (Extensible Stylesheet Language) style sheet, and to set the Message domain, Message set, Message type, and Message format for the generated message.
|
@Tibor : for using the XSL Node, i need to convert my Output XML message to XSL. Do you any tool to convert it ? |
|
Back to top |
|
 |
Tibor |
Posted: Mon Sep 30, 2013 3:44 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Quote: |
@Tibor : for using the XSL Node, i need to convert my Output XML message to XSL. |
I am not an XSLT expert, but I mean you are not right. For a useful guide, please check the XSL Transform sample in your Toolkit. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Sep 30, 2013 4:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
i need to convert my Output XML message to XSL |
Why would you need to convert XML to XSLT? XML is a data format, XSLT is a transformation language for XML.
Please explain! _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
ComputeNode |
Posted: Mon Sep 30, 2013 5:02 am Post subject: |
|
|
Newbie
Joined: 30 Sep 2013 Posts: 5
|
In XSL Transformation Node, property for stylesheet - it is asking for the xsl file and in sample it is .xsl file. |
|
Back to top |
|
 |
joebuckeye |
Posted: Mon Sep 30, 2013 5:15 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Yes, the XSL file is how you convert your XML from your initial version to the version you need to output.
So you need to create an XSL that does the transformation for you. |
|
Back to top |
|
 |
ComputeNode |
Posted: Mon Sep 30, 2013 5:19 am Post subject: |
|
|
Newbie
Joined: 30 Sep 2013 Posts: 5
|
@joebuckeye : i did not got your point. can you explain what are you are tryinh to say. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 30, 2013 5:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ComputeNode wrote: |
@joebuckeye : i did not got your point. can you explain what are you are tryinh to say. |
He's trying to say that if you're using XSLT to transform one XML document into another, you need to develop/code/write/provide an XSL style sheet that does this.
What the rest of us are saying is why are you using XSLT rather than ESQL, Java or any of the other mapping tools provided with the product which are potentially easier to use for your requirement, inculding the quite excellent WMBv8 graphical mapping tool? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
joebuckeye |
Posted: Mon Sep 30, 2013 5:55 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
ComputeNode wrote: |
@joebuckeye : i did not got your point. can you explain what are you are tryinh to say. |
There are numerous ways the broker provides to do transformation from one message format to another format.
Go into the toolkit and open a message flow and click on the Transformation button, it will open and show you many different ways you can do transformation within the broker.
There are numerous ways to do it depending on your skill set and those of the team around you.
But whatever option you pick you will still have to implement the transformation from one format to another. None of these nodes know what you want them to do until you tell them (via code) how to do the transformation.
As Vitor and others have mentioned, XSL is not the first choice most would make but there are cases where it may make sense to use it. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Sep 30, 2013 7:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You appear to be missing some basic concepts.
Maybe you're simply not explaining what you mean very well.
This website and forum is not a training resource. It's very unlikely anyone will provide you step-by-step instructions on exactly what to do to meet your particular requirement.
If you are struggling with HOW TO USE BROKER, you are struggling with very basic concepts. The documentation is a Much better resource for learning that than this website is.
If you are struggling to explain what you are trying to do, then stop asking other people to explain what they mean. go back to simple descriptions of what you are actually doing - the steps you HAVE taken. |
|
Back to top |
|
 |
|