on 2016 Jul 26 11:42 AM
Hi All,
I have to add namespace in below xml tag:-
Actual xml:-
<sendData>
<MicInterfaceRequest>
<Connection>
<connectionID>MICWebService</connectionID>
<partnerID>MICTest</partnerID>
<dateTime>2014-02-12T20:00:00.123Z</dateTime>
</Connection>
</MicInterfaceRequest>
Required xml:-
<MicInterfaceRequest xmlns="urn:http://www.mic-cust.com/Webservice/MicInterface/v1.0">
<Connection>
<connectionID>MICWebService</connectionID>
<partnerID>MICTest</partnerID>
<dateTime>2014-02-12T20:00:00.123Z</dateTime>
</Connection>
</MicInterfaceRequest>
Please help how to achieve this using xslt mapping
Regards
Mahesh
Request clarification before answering.
Hi Manesh!
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" indent="yes"/>
<xsl:template match="/*">
<xsl:element name="{local-name()}" namespace="urn:http://www.mic-cust.com/Webservice/MicInterface/v1.0">
<xsl:copy-of select="./*" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't actually need XSLT for this :
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Yes I m dealing with WSDL file.
And code given in below link help just required some little change in that.
https://scn.sap.com/thread/2062939
Thanks
Hello Mahesh,
Try adding the XML namespace in the Message type.
And for XSLT check the below link
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sritharan,
link you have given is used and its creating node as below :-
e.g.
<MicInterfaceRequest xmlns="urn:http://www.mic-cust.com/Webservice/MicInterface/v1.0">
<MicInterfaceRequest>
<Connection>
<connectionID>MICWebService</connectionID>
<partnerID>MICTest</partnerID>
<dateTime>2014-02-12T20:00:00.123Z</dateTime>
</Connection>
</MicInterfaceRequest>
which is not expected.
Refer the below link
XML Namespaces - Enterprise Services Repository - SAP Library
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.