IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
  • 3 replies
  • Latest Post - ‏2013-02-05T00:00:20Z by kimbert@uk.ibm.com
15 Posts

Pinned topic writing XML to file with Trace Node

‏2008-02-19T09:59:55Z |
I am trying to write XML data to a file in Trace Node with the pattern = ${Environment.Variables.Msg } where Msg is an XML hierarchy. It writes the file as follow:
(0x01000000):soapenv:Envelope = (
(0x03000000):xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/'
(0x03000000):xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x03000000):xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x02000000): = '
(0x01000000):soapenv:Header = (
(0x02000000): = '
(0x01000000):OpHdr = (
(0x02000000): = '
(0x03000000):OpHdrVersNum = '1.2'
(0x02000000): = '
(0x03000000):OpDefCnt = '1'
(0x02000000): = '
<hr />
I need all the XML string to be written in a single line as continuous string.
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <OpHdr> .......................
<hr />
like this. Is there any way to achieve this ? Let me know. Thanks
Updated on 2013-02-05T00:00:20Z at 2013-02-05T00:00:20Z by kimbert@uk.ibm.com
  • elvis_gn
    139 Posts

    Re: writing XML to file with Trace Node

    Use the ASBITSTREAM and convert your tree structure into one string of xml.

    Store this is some variable and then use it in the trace node.

  • sunnytech
    11 Posts

    Re: writing XML to file with Trace Node

    Hi, I am facing the issue, have you got the solution, if yes please share it. Thanks
  • kimbert@uk.ibm.com
    515 Posts

    Re: writing XML to file with Trace Node

    You should use the FileOutput node.
    Don't use the Trace node. It is a diagnostic tool, and is not intended as a file output mechanism for production flows.