CDATA tags within Soap request

0
I am calling a service that expects an XML string in the request message. The other application can't handle escaped xml's or base 64 xmls. Therefore I'm limited to using CDATA. In a microflow variable I create the XML with CDATA tags around it: `<![CDATA[<xml><value>testvalue</value></xml>]]>` When Mendix creates the soap body it will escape all unsafe XML symbols even when they are within a CDATA tag, the request looks like this: <Body> <ns1:GetMetaData xmlns:ns1="http://tempuri.org/"> <ns1:xmlService> &lt;![CDATA[ &lt;xml&gt; &lt;value&gt;testvalue&lt;/value&gt; &lt;/xml&gt; ]]&gt; </ns1:xmlService> </ns1:GetMetaData> </Body> Is this correct behaviour? I would expect that Mendix would escape unsafe XML symbols that are not within a CDATA tag. Do you have a solution?
asked
1 answers
1

I think this will be a tough one (but I welcome our developers to prove me wrong), since even if I create a custom request body using a hardcoded CDATA segment, the webservice/XML engine will convert that to escaped XML before sending the message.

Just how restricted are you to using CDATA? Do you have any options at all for adapting the other side of the service, or switching to another communication mode? There isn't really any semantic difference between CDATA and escaped XML, so ideally, both should be accepted.

If you really need the ability to send CDATA sections using Mendix, I would suggest filing a feature request.

answered