cancel
Showing results for 
Search instead for 
Did you mean: 

removing ns0 from namespace

former_member223432
Participant
0 Kudos

hello,

Have a Idoc to File scenerio.

The file generated after mapping is

Eg:

<ns0:Document xmlns="urn:iso:std:iso:camt">

<tag0>data0</tag0>

<tag1>data1</tag1>

.

.

<ns0:Document>

My requirement is to remove ns0 from the root element "Document" so output is in format(namespace should not be deleted or affected):

<Document xmlns="urn:iso:std:iso:camt">

<tag0>data0</tag0>

<tag1>data1</tag1>

I did follow the XMLAnonymizer blog (/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

).. but no use..Can someone help me in removing this ns0 from namespace.

regards

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> I did follow the XMLAnonymizer blog (/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

> ).. but no use..Can someone help me in removing this ns0 from namespace.

This should work. Was is your configuration of this module and what is the outcome?

former_member223432
Participant
0 Kudos

Hi Stefan,

I have done the changes as per the blog but is not working as expected.it still shows the same.

regards

stefan_grube
Active Contributor
0 Kudos

in which order did you apply the modules?

former_member223432
Participant
0 Kudos

Hi Stefan,

By default,we have a standard callAdapter module and just right after that i added this XMLAnonymizer bean and rest everythig is same as mentioned in the blog.

regards

stefan_grube
Active Contributor
0 Kudos

Put the module at first place, as you see it in the blog.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>> By default,we have a standard callAdapter module and just right after that i added this XMLAnonymizer bean and rest everythig is same as mentioned in the blog.

You did not follow the blog direction. I have implemented XMLAnonymizer bean and worked for us. BTW, as stefan said it should be the first bean followed by standard calladapter module. key value again based on your synchronous aysnchronous interface requirement.

former_member223432
Participant
0 Kudos

Thanks Stefan..Problem solved...there was some problem with the XML also..anyways now its resolved.

Answers (2)

Answers (2)

sunilchandra007
Active Contributor
0 Kudos

Before going for XSLT mapping, check if you have not done any mistake while using XMLAnonymizerBean. http://wiki.sdn.sap.com/wiki/display/XI/ChangingNamespacesandtheencodingformatof+XML

BTW what is the SP level?

Regards,

Sunil Chandra

RKothari
Contributor
0 Kudos

Hello,

IF you are unable to change the prefix using standard module, you can use Java or XSLT mapping to do so.

Please refer to the below thread:

-Rahul

former_member223432
Participant
0 Kudos

Is there any workaround which i can try out???

please suggest

reagrds

Former Member
0 Kudos

>

> Hello,

>

> IF you are unable to change the prefix using standard module, you can use Java or XSLT mapping to do so.

>

> Please refer to the below thread:

>

>

>

> -Rahul

Quote.

I propose to use XSLT mapping.

Former Member
0 Kudos

>

> Is there any workaround which i can try out???

>

> please suggest

>

> reagrds

Check this links:

http://www.riyaz.net/blog/beginners-guide-to-xslt-mapping-in-sap-pi/technology/sap/769/

http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm

Edited by: spantaleoni on Jan 14, 2011 12:44 PM