Search code examples
informaticacdatainformatica-cloud

Including a CDATA field in a Service Connector


An API I am communicating with is Soap based and requires XML with inner XML (CDATA) in the request.

For the service connector action test I have hard-coded the inner xml with this format:

<![CDATA[   
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationCrossReferenceId="123"> 
...
...
</Application>    ]]>

where the dots indicate the data contained. When running the test the request payload has been transformed to the html entity for < which is $lt; - as seen below :

enter image description here

Is there a way to avoid this?


Solution

  • This is a bug in Informatica. the other characters are decoded back to their original correctly, as described in KB 512858, &gt and &lt however are not decoded.

    A bug report has been raised 29.05.2020.

    Edit: Further investigation revealed that using CDATA was not necessary in my case, instead I was able to use the following input for the body binding:

    <Application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationCrossReferenceId="123"> 
        ...
        ...
    </Application>