Skip to Content
0
Former Member
Aug 12, 2016 at 10:33 PM

Replace the namespace using java mapping

2304 Views

Hi friends,

i need java mapping to replace the namespace.

My payload is:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:ASC856_004010 xmlns:ns1="company/ANSI_X12_V4010">

<S_ISA>

</S_ISA>

</ns0:Message1>

<ns0:Message2>

<ns2:ZRFC_UPDATE_FARECON_DETAILS xmlns:ns2="urn:sap-com:document:sap:rfc:functions">

<T_FA_RECON>

<item>

</item>

</T_FA_RECON>

</ns2:ZRFC_UPDATE_FARECON_DETAILS>

</ns0:Message2>

</ns0:Messages>

I want like this:


<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:ASC856_004010 xmlns:ns1="company/ANSI_X12_V4010">

<S_ISA>

</S_ISA>

</ns0:Message1>

<ns0:Message2>

<ns1:ZRFC_UPDATE_FARECON_DETAILS xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<T_FA_RECON>

<item>

</item>

</T_FA_RECON>

</ns1:ZRFC_UPDATE_FARECON_DETAILS>

</ns0:Message2>

</ns0:Messages>


Note: I tried AF_Modules/XMLAnonymizerBean in my receiver channel/Sender channel but it is not working so that i need use java mapping to replace the namespace.


Please advice...




Regards

Ravi