on 02-18-2015 7:16 AM
Hello,
We are using WebService (transaction in SAP MII). And if there are no data this webservice returns data like:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<XacuteResponse xmlns="http://www.sap.com/xMII">
<Rowset>
<Row>
<outXML><![CDATA[<Rowsets DateCreated="2015-02-17T13:59:36"...]]></outXML>
</Row>
</Rowset>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
And this causes problems in WebDynpro part. I guess with mapping. As it get used that if there are no data transaction should return
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<XacuteResponse xmlns="http://www.sap.com/xMII">
<Rowset/>
</XacuteResponse>
</soap:Body>
</soap:Envelope>
So the question is how disable adding/generating of CDATA& Maybe there is some option or parameter at SAP Netweaver Server?
Regards,
Alex
Hi Alexandr,
First of all, your source XML is bad generated. The usage of CDATA is not to interpret like XML syntax the content. Another way is to escape the symbols like < ' with < " and so on. But you have the two ways done, you have escaped the content and to convert this content in text with CDATA.
You have this options:
1. Talk with the sender to have only one way to do it with CDATA or escape characters. Then this XSL cab be used:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>
2. If the sender can't change this output, You will need to deal with the escape characters with a java UDF that takes character to character and changing the escape value for the original. There are some examples in the SCN.
Hope this helps.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexandr,
Please check below thread.
XI: XML node into a string with graphical mapping?
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
Moreover you can read this thread:
RFC : How to pass an entire xml node to a string
Please look into the reply of Henrique
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.