cancel
Showing results for 
Search instead for 
Did you mean: 

XML CDATA

Former Member
0 Kudos

Hi,

I am trying to add a CDATA section to my XML. The payload looks ok, but the actual output received by the legacy system (MQ - using JMS adapter) modifies the < and > to string tags &lt and &gt. Is there a way to prevent the string tag conversion? An existing module? Defining a different element type in the data type? Anything? Please see the example below:

Payload

<ItemIdentification><![CDATA[<Data><ShipMethod>49</ShipMethod><ArchiveDirectory>TBA</ArchiveDirectory><OrderNumber>30026752</OrderNumber><LineItemNumber>01</LineItemNumber></Data>]]></ItemIdentification>

File received by MQ from XI

<ItemIdentification>&lt;![CDATA[&lt;Data&gt;&lt;ShipMethod&gt;49&lt;/ShipMethod&gt;&lt;ArchiveDirectory&gt;TBA&lt;/ArchiveDirectory&gt;&lt;OrderNumber&gt;30026752&lt;/OrderNumber&gt;&lt;LineItemNumber&gt;01&lt;/LineItemNumber&gt;&lt;/Data&gt;]]&gt;</ItemIdentification>

Thanks,

Lisa Adair

Accepted Solutions (1)

Accepted Solutions (1)

former_member189324
Contributor
0 Kudos

Hi Lisa,

There is no module for this problem. You have to do it in the mapping step via Java Mapping, taking the CDATA values as your input parameter and convert the Outbound payload to the inbound message type.

Thanks

Prasad

Former Member
0 Kudos

Prasad & Robin,

Thanks for the help.

Lisa

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Lisa,

A question for you, rather than an answer (sorry): how did you add CDATA sections in the XML file via ABAP? I know of the method CREATE_CDATA_SECTION but don't know how to use it. Would be great if you could offer some help/code snapshot on this.

Best Regards

Viv

Former Member
0 Kudos

In XSLT in looks like that:


<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[

]]
>

]]>

Regards,

Robin