Skip to Content

Handling namespaces in PI using XMLAnonymizerBean – Important factors

Recently, I have seen many questions related to handling namespaces in PI. I believe that few of the questions are related to incorrect usage of modules. This blog is written to highlight the factors that affect the behavior of a module and in particular the XMLAnonymizerBean module during module chain processing. The following are the important factors that affect proper handling of namespaces:

  • The mode of communication – Synchronous / Asynchronous
  • The direction of communication – Sender / Receiver

In the case of asynchronous communication, you always place the XMLAnonymizerBean module before the adapter call as shown in the below picture

In the case of synchronous communication, you always place the XMLAnonymizerBean module before or after the adapter module based on whether you are dealing with request message or response message. For request message, place the modules before the adapter module. For response message, place the module after the adapter module call.

If you are dealing with JMS or Business Connector adapter that have multiple standard modules, please refer additional documentation from SAP at for the exact position of the XMLAnonymizerBean module.

In addition to the above points, the following points are already clearly mentioned in many blogs and SAP help.

Processing Sequence information:

Module name – AF_Modules/XMLAnonymizerBean

Module Type – Local Enterprise Bean

Module key – can be any value

Number – Auto value

Module configuration information:

Module key – Value specified in processing sequence

Parameter name – anonymizer.acceptNamespaces, Parameter value – Space delimited name value pairs.

  • Name is the namespace
  • Value is the prefix
  • If you do not want to use any prefix, use ”(two single quotation marks).
  • Any namespaces that are not specified are removed.
  • If this parameter is not specified, all namespaces are removed.

Optional Parameter name – anonymizer.quote, Parameter value – Character to be used to enclose the attribute values

Optional Parameter name – anonymizer.encoding, Parameter value – encoding other than UTF-8. Default value is UTF-8

Example configuration for illustration:

Additional references on SCN:

Remove namespace prefix or change XML encoding with the XMLAnonymizerBean

Changing Namespaces and the encoding format of XML

Standard Adapter Framework modules [AF_Modules] in PI 7.1 –Part 1

Useful SAP links:

SAP Library – Adding Modules to the Module Processor

Extending Module Chain for SAP Adapters in the Module Processor 7.3

You must be Logged on to comment or reply to a post.
  • hi Nageshwar,

    I read in a few threads that this anonymizer bean cannot be used in a SOAP sender channel. I have exactly the same requirement. Can you please let me know if this is possible since your screenshots show SOAP channel though i am not sure if its a sender or receiver.

    To add on, I am using PI 7.1



      • Thanks for your reply Nageshwar.

        My requirement is that i need to send an XML to a party (receiver channel is As2 adapter - SEEBURGER).

        In between, since we have two XI boxes in our architecture, we need to send the message from one box to another and we are using SOAP channels for that. once the message reaches the second box, it should have been moved directly to the party, but now since the SOAP namespace is present in the header, I need to remove it before i send it to the party. I tried using the anonyzmizer in the AS2 receiver channel, but it doesnt seem to work!

        Please let me know your thoughts on this.