Support Article
SOAP Request with CDATA and attachments throws Error
SA-19915
Summary
Unable to parse XML enclosed in CDATA during Service SOAP Inbound Data Mapping.
The Parse XML fails when CDATA tag is present in the SOAP Request when CDATA and attachments both are present.
Error Messages
Failed to Parse XML. Error: Reference is not allowed in prolog.
Steps to Reproduce
Not Applicable.
Root Cause
A software use or operation error the special characters like & in the subsequent XML data; which was being sent with the request in CDATA tag were not being handled.
Resolution
The special characters and CDATA can be handled in property-set method of the service activity by the use of following expression or function call.
@String.replaceAll(Primary.cdata_prop,"]] >","")
@String.replaceAll(Primary.cdata_prop,"<![CDATA[","")
@String.trim(Primary.cdata_prop)
Published February 20, 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.