Skip to main content

Support Article

CDATA Tag characters "<" and ">" are transformed to &lt; and&gt;



The CDATA angle brace tag characters ("&lt;" and "&gt;") are unexpectedly converted to substitution characters (&lt; and &gt;)

&lt;ns1:ReturnFormResponse xmlns:ns1="urn:PegaRULES:SOAP:SendPartsReturnFormToiClaim:Services"&gt; &lt;PDFImage&gt;&lt;![CDATA[%PDF-1.4 %����� 1 0
%%EOF ]]&gt;&lt;/PDFImage&gt; &lt;StatusCode&gt;&lt;/StatusCode&gt; &lt;StatusMessage&gt;&lt;/StatusMessage&gt; &lt;/ns1:ReturnFormResponse&gt;

Error Messages

Not Applicable.

Steps to Reproduce

Try to send a large data in CDATA tag (in an xml literal) and notice that Pega 7 is transforming the characters &lt;&gt; to &lt; and &gt;
  1. Create a SOAP Service with one XML literal in SOAP response.
  2. Set the large data between CDATA tags for a Response Data Element.
  3. Unit test by running the SOAP service and notice the transformed CDATA tags of Response SOAP response elements.

Root Cause

Default behavior is that Pega will encode the values.


Perform the following local-change: 
  1. Change SOAP service response as single value property to store the xml data.
  2. Create a XML stream rule to read the read clipboard content. Reference pega tag:
    1. &lt;pega:reference name="INFO" mode="text"/&gt;
    2. For example &lt;input&gt; &lt;pega:reference name="INFO" mode="text"/&gt; &lt;/input&gt;
  3. Use property-set-xml to call XML stream rule and store the value in single value property that is set in SOAP service response mapping.


Suggest Edit

Published June 7, 2016 - Updated October 8, 2020

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us