I'm trying to use payload factory mediator in WSO2 am to transform Json to XML. But my XML should contain CDATA.
When I use the mediator in wso2, the CDATA is transform : the Cdata tags disappear and all the < and > in my CDATA are transformed to <
and >
In the documentation of wso2 1 and on stackoverflow, I find that I should put the javax.xml.stream.isCoalescing
to false (from <APIM_HOME>/XMLInputFactory.properties
). But it doesn't work : just the > are conserved, the others are transformed.
what I want to keep :
<soapenv:Body>
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<body>
<MSISDN>111111111</MSISDN>
</body>
</Data>
]]></soapenv:Body>
and what I have actually :
<soapenv:Body>
<?xml version="1.0" encoding="UTF-8"?>
<Data>
<body>
<MSISDN>111111111</MSISDN>
</body>
</Data></soapenv:Body>
Someone can help me ? because I don't understand why the doc's instructions don't work.
Thanks a lot