XML string being escaped/decoded when wrapped in CDATA and used in a web serivce

0
Hi all I’m using a third party webservice, and one of the attributes i need to send in the body is a string of XML wrapped in CDATA. Here’s what the value looks like in the debugger, after my sub microflow creates the string. Or this: <QuestionData> <isMetricSystem>false</isMetricSystem> <Height1>5</Height1> <Height2>5</Height2> <Weight1>8</Weight1> <Weight2>8</Weight1> </QuestionData> The problem is, when it gets passed through the Web Service, it’s getting automatically escaped/partially decoded, so this is what the actual request looks like… Note the < tags being replaced with &lt;. This is making the web service unusable, as this API isn’t able to handle that string they’re actually receiving. Does anyone know of any workarounds to this issue, to prevent this automatic escape/decode? It’s really frustrating that Mendix seems to do this without any settings to allow otherwise.
asked
2 answers
1

Our workaround to fix this was to build the XML by hand, pass it to custom Java action that POSTs the data to the webservice, and returns an XML string that can be imported using an Import Mapping.

It’s not ideal, but works until we can find a better solution.

answered
0

Question 1892286250 and 6218 are pretty similar but do not have an answer.

 

answered