HTTPS Task With CDATA in XML Response

Post any question you may have in regards to GoAnywhere MFT and let our talented support staff and other users assist you.
1 post Page 1 of 1

jbeekman

Posts: 4
Joined: Thu Feb 18, 2016 9:16 am

Post by jbeekman » Tue Aug 09, 2016 8:00 am
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>
1 post Page 1 of 1