Author |
Message
|
new2mqdotnet |
Posted: Fri Oct 16, 2009 10:57 am Post subject: Converting input XML data to data string/flat file |
|
|
Newbie
Joined: 16 Oct 2009 Posts: 2
|
I am currenting developing using the WMB Toolkit version 6.0.2. I am simply trying to take an input message (XML format) and create an outbound message that needs to be in sting format. This seems so easy and I wonder if it was a node or feature/code within ESQL that can easily do this without having to create an outbound message set. Below is what I have.
1. Inbound Message in XML format (using a DTD to validate message)
2. Take message into a compute node. (complete field level transformations to complete business logic.
3. Need to take transformed message and pass it to two applications that require string format.
So this XML message...
<?xml version="1.0" encoding="iso-8859-1" ?>
- <TESTMESSAGE>
- <IDOC BEGIN="1">
- <SAMPLEDATA SEGMENT="1">
<FIELD1>A</FIELD1>
<FIELD2>B</FIELD2>
<FIELD3>C</FIELD3>
</SAMPLEDATA>
</IDOC>
</TESTMESSAGE>
Should look like this output string...
ABC |
|
Back to top |
|
 |
sridhsri |
Posted: Fri Oct 16, 2009 11:43 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
I don't think you should be doing this without creating a outbound message set. I think you should avoid writing any code in ESQL which deals with the physical format of a message. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Oct 16, 2009 6:26 pm Post subject: Re: Converting input XML data to data string/flat file |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
new2mqdotnet wrote: |
I wonder if it was a node or feature/code within ESQL that can easily do this without having to create an outbound message set. |
No. The message set describes the output format to WMB so it can be written. You know it's just a simple string but WMB doesn't. It could be tagged, delimited or have other contents.
Note that you don't need a message set to output XML because XML is self-describing.
If you don't fancy ESQL you can use a mapping node. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
new2mqdotnet |
Posted: Fri Oct 16, 2009 8:59 pm Post subject: |
|
|
Newbie
Joined: 16 Oct 2009 Posts: 2
|
Thanks Sridhsri and Vitor for the quick response.
Vitor,
You are correct. Unlike XML the string format actually has fixed length fileds which would require me to use a message set. I didn't realize that until after I posted the message. I kept think oh its simple not realize the recieving application needs to know how to parse the data. I didn't want to build a message set because this particular message is actually a SAP IDOC with many repeating segments and many parent and child relationships. I will either have to create a message set or create sometype of C/Cobol copybook. Wish me luck.
Again, thanks for your help and hopefully you see this post. |
|
Back to top |
|
 |
Vitor |
Posted: Sat Oct 17, 2009 2:11 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
new2mqdotnet wrote: |
I didn't want to build a message set because this particular message is actually a SAP IDOC |
I'd be surprised if you had to build a message set by hand for that. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|