on 08-02-2011 7:40 AM
Hi All,
The output of the mapping that U am implementing expects CDATA part in the output
The CDATA part should be this way
<v1:Body messageType="CUSTIMPORT"><![CDATA[<.....Message xsi:schemaLocation="http://www.../Webservice/....Message/ MicCustImportMessage1.3.xsd" xmlns="http://www...../Webservice/....Message/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Means,the CDATA is applicable to only }<v1:Body messageType="CUSTIMPORT"> .
So I will have to use both graphical as well as XSLT mapping
I do not know the XSLT.
Can you please provide me the XSLT code for the requirement?
Also,how to mention those mappings in the interface mapping/operation mapping?
Thanks in advance
answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
chk this also:
/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping
basics of xslt:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/000ee4d0-be91-2d10-8aaf-ff8045bdd37d
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja Sekhar and AMit,
Thanks for the quick replies.
I have gone through the blogs you mentioned
But in my mapping the CDATA is applicable to the root element of the node .
The strucutre is somewhat like this
<soapenv:Envelope
<soapenv:Header/>
<soapenv:Body>
<v1:Messages>
<v1:Message>
<v1:Envelope>
.
.
.
</v1:Envelope>
<v1:ActionCode>
<v1:code>DIC</v1:code>
</v1:ActionCode>
<<v1:Body messageType="CUSTIMPORT"><![CDATA[<.....Message xsi:schemaLocation="http://www.../Webservice/....Message/ MicCustImportMessage1.3.xsd" xmlns="http://www...../Webservice/....Message/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
It is this field/node where mapping is applicable..
<<v1:Body messageType="CUSTIMPORT">
The code in the blog is
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p2="http://frik.bcc.com.pl">
<xsl:template match="/">
<p2:inside xmlns:p2="http://frik.bcc.com.pl">
<name>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="p2:outside/name"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</name>
</p2:inside>
</xsl:template>
</xsl:stylesheet>
For my mapping requirement should the code be like this
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p2="http://frik.bcc.com.pl">
<xsl:template match="/">
<p2:inside xmlns:p2="http://frik.bcc.com.pl">
<Body>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[ <.....Message xsi:schemaLocation="http://www.../Webservice/....Message/ MicCustImportMessage1.3.xsd"]]></xsl:text>
<xsl:copy-of select="p2:outside/Body"/>
<xsl:text disable-output-escaping="yes"><![CDATA[xmlns="http://www...../Webservice/....Message/"]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">>]]></xsl:text>
</name>
</p2:inside>
</xsl:template>
</xsl:stylesheet>
Should the inverted commas be also there?
If there is any improvement please paste it.
Thanks in advance
Hi,
I created the following code as per the othr blog you mentioned.
Please correct it if it is wrong
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:template match="ns0:Envelope">
</xsl:template><xsl:value-of select="ns0:Body" disable-output-escaping="yes"/>
</xsl:stylesheet>
Thanks in advance
Hi shweta,
Please refer this link for step by step approach to create imported archive for XSL
Hi Abhishek and Debashish,
Thanks for your valuable suggestions.
I put 2 mappings in the operation mappings that is message mapping and the XSLT mapping,but I am getting error ,I think it is for CDATA portion.
Do I need to test the mapping seperately for the message and CDATA portion?
If so,then how to do it?
Thanks in advance
>
<?xml version='1.0'?> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"> > > <xsl:template match="ns0:Envelope"> > > </xsl:template><xsl:value-of select="ns0:Body" disable-output-escaping="yes"/> > > > </xsl:stylesheet>
>
you sure above is the XSLT code? in my opinion this code is not going to work....
value-of is out of the template section....should it not be within the template (as template defines your XML structure)?
I could not see any CDATA in your code....you need to write the code similarly to what Michal has described in his blog.
I would suggest that you make use of some XSLT tool (like Stylus Studio) to write the code or you can make use of an online testing tool which will give you the result: http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_ex1
Hi Abhishek,
I tried the xslt code form michel as well
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p2="http://www......com/Webservice/.../...">
<xsl:template match="/">
<p2:inside xmlns:p2="http://www......com/Webservice/.../...">
<Body>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="p2:outside/Body"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</Body>
</p2:inside>
</xsl:template>
</xsl:stylesheet>
Is it the correct one?
If not can you please suggest some changes?
I am confused about the xmlns:p2="http://www......com/Webservice/.../...">
part as there are 2 different urls mentioned in the source data and not getting which one to select.
Can you please help me?
Thanks in advance
refer below link
/people/danny.deroovere/blog/2008/11/30/how-to-map-cdata-to-a-structured-message-in-xi
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.