Skip to Content
avatar image
Former Member

removing prefix from namespace

HI Experts

We have Synchronous Rest -->PI--Proxy scenario and we are having PI 7.31.

Now when we receive a response from R3 system there is a namespace change because of which it throws error in sender system, though it is succesfull in PI.

Does anonymiser bean works with Rest adapter?

We have tried with anonymizer bean but see no changes in response.

If no, apart from putting java map is there any other way out to deal with it.

sap.com:proxy:XXXX" xmlns:n0="http://XXXXX">

n0 has to be replaced by nm

Anonymiser bean is used with below parameter value.

anonymizer.acceptNamespaces= urn:sap.com:proxy:XXXX prx http://XXXXX nm

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 23, 2016 at 07:08 AM

    Hi SAP PI!

    I guess XMLAnonymizerBean should work with Rest adapter. Why not to check it yourself?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2016 at 07:41 AM

    Hi Evgeniy

    Thanks for reply.

    i have applied the anonymiser bean after the call adapter module in rest channel (as the idea is to use in response structure) but it is not changed.Message log says anonymizer applied in monitoring.

    namespace changes are

    Desired::: sap.com:proxy:XXXX" xmlns:nm="http://XXXX">

    Getting:: sap.com:proxy:xxxxxx" xmlns:n0="http://xxxxx">

    bean used:

    localejbs/AF_Modules/XMLAnonymizerBean

    anonymizer.acceptNamespaces =

    urn:sap.com:proxy:XXXX prx http://XXXXXX nm

    Also in Rest adapter channel confguration the namespace is nm (desired) is maintained but still the response payload is not changed to "nm" from "n0"

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 06, 2016 at 04:41 AM

    Hi All

    Anonymiser bean is applied in rest adapter and sender is receiving the correct response only for those response message which doesnt have array like structure.

    For those who have some Array structure passed in response,they result in incorrect response, i.e, some braces etc are missed in the json response at sender side.

    How is the translation happening, how can i view this.

    I then tried removing the bean with changing the namespace in response setting of rest adapter to n0 (in the prefix it is received by CRM system) that results in correct structure. Am not sure how this adapter with and without bean working .

    Can anyone suggest.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 08, 2016 at 07:15 AM

    applying the anonymiser bean and changing prefix namespace to the one as desired is changed which worked.Thanks

    Add comment
    10|10000 characters needed characters exceeded