CDATA Tag characters "<" and ">" are transformed to < and>
SummaryThe CDATA angle brace tag characters ("<" and ">") are unexpectedly converted to substitution characters (< and >)
<ns1:ReturnFormResponsexmlns:ns1="urn:PegaRULES:SOAP:SendPartsReturnFormToiClaim:Services"> <PDFImage><![CDATA[%PDF-1.4 %����� 1 0
%%EOF ]]></PDFImage> <StatusCode></StatusCode> <StatusMessage></StatusMessage> </ns1:ReturnFormResponse>
Error MessagesNot Applicable.
Steps to ReproduceTry 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 CauseDefault behavior is that Pega will encode the values.
ResolutionPerform 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