on 02-04-2010 1:52 PM
Hello,
I have to change the prefix from my message mapping from ns0 to ns, in other words from this:
- <ns0:PurchaseOrderRequest xmlns:ns0="http://sap.com/xi/SAPGlobal/Global">
to this:
<n0:PurchaseOrderRequest xmlns:n0="http://sap.com/xi/SAPGlobal/Global"
And please don't ask me why. That's a long story
I'm aware of the XMLAnonymizerBean, but this is not an option since HTTP adapter is used.
I have also tried the following xsl, but this one removes the prefix completely:
<?xml version="1.0"; encoding="UTF-8"?>
<ns0:stylesheet version="1.0"; xmlns:ns0="http://www.w3.org/1999/XSL/Transform">
<ns0:output method="xml" encoding="UTF-8"/>
<ns0:template match="/">
<ns0:copy>
<ns0:apply-templates/>
</ns0:copy>
</ns0:template>
<ns0:template match="*">
<ns0:element name="{local-name()}">
<ns0:apply-templates select="@* | node()"/>
</ns0:element>
</ns0:template>
<ns0:template match="@*">
<ns0:attribute name="{local-name()}">
<ns0:value-of select="."/>
</ns0:attribute>
</ns0:template>
<ns0:template match="text() | processing-instruction() | comment()">
<ns0:copy/>
</ns0:template>
</ns0:stylesheet>
Anyone who has done something similar to this?
Thanks,
Per
Hi Per,
If the desired prefix change is to be delivered to the target system after transformation you can also use module in your receiver channel and can use the replace string in the module. Always better to use the dynamic parameter code in your module and can take the input from Module Configuration against your module parameter name.
Thanks & Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Per,
i had a similar situation and i used Java mapping with replace function to replace the namespace to the desired value.
Thanks,
Venkatesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
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.