on 04-01-2015 6:56 AM
Hi Experts,
i have sent the PO’s. The
files look good, except for the name space, ‘nm’ instead of ‘n0’.
What they received:
<nm:PurchaseOrderERPRequest_V1 xmlns:nm="http://sap.com/xi/"
What they expect:
<n0:PurchaseOrderERPRequest_V1 xmlns:n0="http://sap.com/xi"
can you please give me the better solution on this.
Thanks ,
Abhilash.
Hi Abhilash,
First of all Eng is right and the name of the namespace shouldn't be important, the important is its value.
However you can do it using the XMLAnonymizerBean http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/07/10/handling-namespaces-in-pi-using-x...
Also you can do it with an XSLT mapping easily.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash
The actual value of the prefix nm/n0 does not really matter as long as it matches the declaration part xmlns:<prefix>.
What type of application is the receiver system?
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anyway, if you really need to, you can try adding the following XSLT
<xsl:stylesheet xmlns:n0="http://sap.com/xi/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="*[local-name()='PurchaseOrderERPRequest_V1']">
<n0:PurchaseOrderERPRequest_V1 xmlns:n0="http://sap.com/xi/">
<xsl:apply-templates select="@* | node()"/>
</n0:PurchaseOrderERPRequest_V1>
</xsl:template>
<xsl:template match="/ | @* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Another XSLT example:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="*">
<n0:PurchaseOrderERPRequest_V1 xmlns:n0="http://sap.com/xi">
<xsl:copy-of select="/child::*/child::*"/>
</n0:PurchaseOrderERPRequest_V1>
</xsl:template>
</xsl:stylesheet>
Regads.
Hi Eng,
Check the example 3 in the note 880173 - XI 3.0 Adapter Framework XML Anonymizer Module , it is possible to change namespaces.
Regards.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.