on 06-29-2009 3:21 PM
Hi gurus,
i have imported an XSD file as an external definition and use this for a mapping. After my mapping i have an xml file like:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Aviso xmlns:ns1="http://Post.AG/PartnerInterface/Schemas/PVSdeAt/Aviso_V1.0">
- <ns2:Header xmlns:ns2="http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoHeader">
<ns2:DebitorAuftraggeber>0022022315</ns2:DebitorAuftraggeber>
<ns2:Kundenname>WNT Deutschland GmbH</ns2:Kundenname>
<ns2:Erstellungsdatum>2009-06-26T16:12:25</ns2:Erstellungsdatum>
<ns2:Versanddatum>2009-06-26T16:12:25</ns2:Versanddatum>
</ns2:Header>
- <ns3:Absender xmlns:ns3="http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoShipper">
<ns3:Absendername1>WNT Deutschland GmbH</ns3:Absendername1>
<ns3:Absendername2 />
<ns3:Absendername3 />
<ns3:Absendername4 />
Now the question is how to change the namespace tags ns1 ns2 ns3? The target XML-File should view like this: (ns1 = ns0; ns2 = ns1; ns3 = ns2)
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Aviso xmlns:ns1="http://Post.AG/PartnerInterface/Schemas/PVSdeAt/Aviso_V1.0">
- <ns1:Header xmlns:ns2="http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoHeader">
<ns1:DebitorAuftraggeber>0022022315</ns2:DebitorAuftraggeber>
<ns1:Kundenname>WNT Deutschland GmbH</ns2:Kundenname>
<ns1:Erstellungsdatum>2009-06-26T16:12:25</ns2:Erstellungsdatum>
<ns1:Versanddatum>2009-06-26T16:12:25</ns2:Versanddatum>
</ns1:Header>
- <ns2:Absender xmlns:ns3="http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoShipper">
<ns2:Absendername1>WNT Deutschland GmbH</ns3:Absendername1>
<ns2:Absendername2 />
<ns2:Absendername3 />
<ns2:Absendername4 />
Thanks a lot,
Max
Hi,
you can use a XSLT mapping as step within you Interface mapping to change the namespace tags. Just make sure the produced message matches the XSD structure (external definition) of the destination message interface.
Check:
Regards,
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no need to change namespace prefixes. It does not make any difference, which namespace you use.
The prefix links the namespace to the nodes, that's all.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Max,
Please check stefans blog for this issue:
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
Please try to give as mentioned in his example.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
i found this link https://wiki.sdn.sap.com/wiki/display/XI/NAMESPACE with very helpfull ideas and now the problem is solved.
Thanks to all
Max
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.