Skip to Content
0

Actual Namespace after removing the prefix by using the xml Anonymizer Bean in SAP PI

Sep 25, 2017 at 11:54 PM

113

avatar image
Former Member

Hi Team,

we have configured the xmAnonmyzer Module parameters in JMS sender adapter. The prefix started with <dsr:LineItemItems>6</dsr:LineItemItems> are removed by the module parameters but in the main tag the "xmlns" & "xsi" namespaces are missing in the ouput xml.

Please help us to get the main tag with the namespaces.

Input xml:

<?xml version="1.0" encoding="utf-8"?>
http://www.w3.org/2001/XMLSchema-instance" xmlns:dsr=" http://www.dsr.com/rsd/tlog/markup/poslog" xsi:schemaLocation=" http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd http://www.dsr.com/rsd/tlog/markup/poslog DSRPOSLog.xsd" xmlns=" http://www.nrf-arts.org/IXRetail/namespace/">
<Transaction CancelFlag="false" TrainingModeFlag="false">
<RetailStoreID>1101</RetailStoreID>
<BusinessUnit>
<UnitID Name="1101" TypeCode="RetailStore">Store_1101</UnitID>

Module Configurations in JMS sender adapter:

Output Message:

<?xml version='1.0' encoding='utf-8'?>

<Transaction CancelFlag='false' TrainingModeFlag='false'>
<RetailStoreID>1101</RetailStoreID>

Namespaces are missing in the output messages the POSLog message.

Please help us to get the actual namespaces in the output message genearated by JMS sender adapter.

Thanks,

Ravi

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Sep 26, 2017 at 06:04 PM
0

Hello Ravi,
There were 2 known issue with incorrect NS handling in XMLAnonymizerBean. Please check SAP Notes 1920468 and 1725341. I believe the parameter from 1st Note will resolve the problem.

Best regards,
Vadym

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Vadym,

The namespace prefix for elements and attributes is working fine, here the issue is with the namespace in the first tag <POSLog> we need all the namespaces present the input xml first tag<POSLog> with out any change.

POSLog tag should be same in both input xml and output xml.

we have done the mapping part only the pending part is namespace issue.

Please help us to resolve the issue.

Input xml:

<?xml version="1.0" encoding="utf-8"?> <POSLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dsr="http://www.dsr.com/rsd/tlog/markup/poslog" xsi:schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd http://www.dsr.com/rsd/tlog/markup/poslog DSRPOSLog.xsd" xmlns="http://www.nrf-arts.org/IXRetail/namespace/">
<dsr:LineItemItems>6</dsr:LineItemItems>

Output from xml Anonymezer Module:

<?xml version="1.0" encoding="UTF-8"?><POSLog schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd http://www.dsr.com/rsd/tlog/markup/poslog DSRPOSLog.xsd">
      <LineItemItems>6</LineItemItems>

Expected Output:

<?xml version="1.0" encoding="UTF-8"?>
<POSLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dsr="http://www.dsr.com/rsd/tlog/markup/poslog" xsi:schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/ POSLog.xsd http://www.dsr.com/rsd/tlog/markup/poslog DSRPOSLog.xsd" xmlns="http://www.nrf-arts.org/IXRetail/namespace/">
      <LineItemItems>6</LineItemItems>
0
Former Member

Hello Ravi,
I understood the problem from the very beginning, based on example payload results that you provided. Once again, have you checked the suggested SAP Notes? If you'd check it attentively there is a link to extended documentation - https://help.sap.com/saphelp_nw73/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm which explains property anonymizer.acceptNamespaces of XMLAnonymizerBean

Best regards,
Vadym

0
Former Member
Former Member

Thanks Vadym,

For the valuable information.

We followed the given SAP Notes-SAP Notes 1920468, 1725341 and 880173. The issue has been resolved by modifying the namespaces.

Regards,

Ravi

1
Former Member
Former Member

Hello Ravi,
Great to hear!

Best regards,
Vadym

0