I'm using the HTTPS Task and postRawData to send a SOAP request which responds with a SOAP envelope that contains a CDATA text value in the body. The response gets written to a file with the CDATA tags removed and the ensuing text encoded for XML, ie. '<' becomes '<' and '>' becomes '>'.
Is there a way for the task to preserve the response exactly as it is returned, with the CDATA block unmodified?
I appreciate the help!
Expected Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<ManualInvoiceResponse xmlns="http://looksoftware.com/webservices/">
<ManualInvoiceResult><![CDATA[<ResultDetails><Status>Failure</Status><Errors><Error>Contract not found</Error></Errors></ResultDetails>]]></ManualInvoiceResult>
</ManualInvoiceResponse>
</soap:Body>
</soap:Envelope>
Response as written by HTTPS Task:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ManualInvoiceResponse xmlns="http://looksoftware.com/webservices/">
<ManualInvoiceResult><ResultDetails><Status>Failure</Status><Errors><Error>Contract not found</Error></Errors></ResultDetails></ManualInvoiceResult>
</ManualInvoiceResponse>
</soap:Body>
</soap:Envelope>
Task Configuration:
<https label="ManualInvoice Web Service" resourceId="TotalSafety WebServices" version="1.0" disabled="false">
<postRawData label="Post ManualInvoice SOAP Request" uri="${look.uri}" inputFile="${ManualInvoice.RequestFile}" contentType="text/xml;charset=UTF-8" readTimeout="240" responseBodyDestination="file" responseBodyFile="${Invoice.Directory}\invoice-response.xml" whenResponseBodyFileExists="overwrite" responseHeadersDestination="joblog" responseBodyFileVariable="ManualInvoice.RequestFile">
<header name="SOAPAction" value="http://looksoftware.com/webservices/ManualInvoice" />
</postRawData>
</https>