Skip to Content

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 http://help.sap.com/saphelp_nw73/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm 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:

The below configuration removes all the namespaces except http://test.com/service/cryptography/2007/11/15. Also, note that the prefix ns0 is used.

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

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Ninu Sankar

    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

    Regards,

    ninu

    (0) 
      1. Ninu Sankar

        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.

        Regards,

        Ninu

        (0) 
        1. Nageshwar Reddy Post author

          Please place the call to anonymizer before the call to the adapter and try. In the picture in this blog, anonymizer module is placed after the adapter call. Let me know if this works for you.

          (0) 

Leave a Reply