cancel
Showing results for 
Search instead for 
Did you mean: 

Question on XML AnonymizerBean

justin_santhanam
Active Contributor
0 Kudos

Hello,

I have gone through Stefan's response in the other thread that this is possible, but I'm missing something. If anyone has idea, could you please suggest your solution?

I'm sending synchronous call to webservice and getting a response. The response has some x namespace and I want it to change it to y namespace. So I did the following, but always I'm getting x namespace when I look in the sxmb_moni.

Added anonymizer module after the SOAPBean Module

ParameterName: anonymizer.acceptNamespaces

Value:

http://abc ' ' http://def ' '

When I look in the sxmb_moni, I'm seeing only http://abc and not http://def ' '

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Hello Again,

According to the help.sap.com [link|http://help.sap.com/saphelp_nwpi711/helpdata/en/45/d169186a29570ae10000000a114a6b/frameset.htm]

under Parameter Value, enter a list of namespaces and their prefixes that are to be kept in the XML document as follows: namespace1 n1 namespace2 n2 u2026

So the syntax which I've given doesn't seems to be correct.

Any ideas?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Hi Raj

XMLAnonymizerBean is used to change namespace prefixes or removing namespace.

If you dont specify namespace... that means you are removing that namespace from Xml

If you want to change prefixes for namespace then it is possible by doing the way you mentioned

Example: <ns1: http://test>; ns1 is prefix, http://test is namespace

if you want to change namespace prefix from ns1 to nt1 then specify as

Under Parameter Name, enter anonymizer.acceptNamespaces.

Under Parameter Value, http://test nt1

you cannot change the namespace using XMLAnonymizerBean. You might have to use Java or XSLT mapping to achieve this.

Hope that helps.

justin_santhanam
Active Contributor
0 Kudos

Baskar,

Can you please go through Stefan's blog -[blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5767] [original link is broken] [original link is broken] [original link is broken];

You can use the bean for changing the default namespace to a requested one, which is obligatory in some rare scenarios, like pidx.

Any thoughts?

Raj.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Yes Stefan's blog says that namespace can be modfied using this bean. SAP help document does not say like that...

check this link

http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm

Check the shabarish reply here...

IMHO, XMLAnonymizerbean does not support changing the namespace.

@Stefan: Please clarify this.

justin_santhanam
Active Contributor
0 Kudos

Baskar,

This is from SAP note: 880173

The module can be configured to anonymize elements and attributes from namespaces other than the specified namespaces and/or to use specific namespace prefixes for some namespaces.

I guess we've to wait for Stefan's reply..

Raj.

aashish_sinha
Active Contributor
0 Kudos

Hi Raj,

I hope you are using AnonymizerBean as Below, if not give a shot, lets see what happens.

Use the adapter module AF_Modules/XMLAnonymizerBean in your receiving CC. Put its module key as "0" and the module key for CallSapAdapter as "1".

The module parameters will be

(1) anonymizer.acceptNamespaces = namespace1 if

(2) anonymizer.quote = "

(3) anonymizer.encoding = ISO-8859-1.

Regards

Aashish Sinha

Edited by: Aashish Sinha on Mar 9, 2011 5:55 AM did a bit of alignment

stefan_grube
Active Contributor
0 Kudos

> You can use the bean for changing the default namespace to a requested one, which is obligatory in some rare scenarios, like pidx.

Sorry, this is an error. It should be:

You can use the bean for changing the default namespace prefix to a requested one, which is obligatory in some rare scenarios, like pidx

I will change it.

justin_santhanam
Active Contributor
0 Kudos

Thanks Bhaskar & Stefan - time to think for an alternative approach

Answers (0)