Hi All,
I've got a scenario where I have to map a IDoc to a Webservice. The webservice accepts the data as following:
<SendMessage> <message> <![CDATA[ <comtec> ... </comtec> ]]> </message></SendMessage>
I've got my XSLT mapping as the following:
<?xml version="1.0" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge" xmlns:cais=""> <xsl:output method="xml" encoding="UTF-8" cdata-section-elements="text"/> <xsl:template match="/"> <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"> <ns0:Message1> <xsl:for-each select="ns0:Messages/ns0:Message1/comtec"> <cais:SendMessage xmlns:ns1="http://www.xxx.com/"> <cais:message> <xsl:text disable-output-escaping="yes"><![CDATA[ </xsl:text> <xsl:copy-of select="." /> <xsl:text disable-output-escaping="yes"> ]]> </xsl:text> </cais:message> <cais:commandName>CCDMSimport</cais:commandName> </cais:SendMessage> </xsl:for-each> </ns0:Message1> </ns0:Messages> </xsl:template></xsl:stylesheet>
When I test the XSLT in the Message Mapping I'm getting the exact result as described above. But when the file is processed by the receiving adapter (e.g. a File Receiver to test the result). I get the following result:
<?xml version="1.0" encoding="UTF-8"?><SendMessage> <cais:message> <comtec > ... </comtec> </cais:message></SendMessage>
As you can see, the whole "CDATA" declaration is gone and all special characters have been encoding to HTML entities.Is there a way to disable this convertion? I assume the conversion is done right after the message mapping. Because the message is encoded already when I check the Message Monitoring after the mapping.
(I've already tried to change the File receiver encoding to ISO and UTF).
Hoping someone can help me.
Koen Schouten