Support Article
CDATA Tag characters "<" and ">" are transformed to < and>
SA-24043
Summary
The CDATA angle brace tag characters ("<" and ">") are unexpectedly converted to substitution characters (< and >)
<ns1:ReturnFormResponse xmlns:ns1="urn:PegaRULES:SOAP:SendPartsReturnFormToiClaim:Services"> <PDFImage><![CDATA[%PDF-1.4 %����� 1 0
%%EOF ]]></PDFImage> <StatusCode></StatusCode> <StatusMessage></StatusMessage> </ns1:ReturnFormResponse>
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 <> to < and >
- Create a SOAP Service with one XML literal in SOAP response.
- Set the large data between CDATA tags for a Response Data Element.
- 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.
Resolution
Perform the following local-change:
- Change SOAP service response as single value property to store the xml data.
- Create a XML stream rule to read the read clipboard content. Reference pega tag:
- <pega:reference name="INFO" mode="text"/>
- For example <input> <pega:reference name="INFO" mode="text"/> </input>
- 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.
Published June 7, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.