cancel
Showing results for 
Search instead for 
Did you mean: 

Namespace in XML

Former Member
0 Kudos

Hi all, I am using the Test Tab in message mapping to test the mapping.

Somehow it is required for me to have a namespace prefix for my XML root element, otherwise an error would be thrown.


	<ns0:MDMBusinessPartner xmlns:ns0="http://sap.com/xi/MDEApplicationContent">

I would like to specify a root element without namespace.

For e.g.


      <MDMBusinessPartner>

Where should i make the necessary changes?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can ignore the namespace in message type editor while creating the message type.

Check this link also..

/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

Former Member
0 Kudos

You can ignore the namespace in message type editor while creating the message type.

I have ignore and remove the namespace in the message type editor.

So when i click on source in the Message Test Tab, it has becomes


<MDMBusinessPartner>

However i when click execute it still prompts me


Cannot produce target element /HRMD_A07. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

any advicE?

Former Member
0 Kudos

Cannot produce target element /HRMD_A07. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

Its not the problem with namespace.Problem with mapping.Check this mapping field HRMD_A07.

Former Member
0 Kudos

But the problem is

when i put in



 <ns0:MDMBusinessPartner xmlns:ns0="http://sap.com/xi/MDEApplicationContent">

in the source instead of



 <MDMBusinessPartner>

The test is executed successfully.

Former Member
0 Kudos

Make sure that your target structure also does not contain the namespace.

Former Member
0 Kudos

Solved the problem.

<MDMBusinessPartner> was mapped to <HRMD_A07>. So i removed the mapping and i am able to use the root element without any namespace.

Answers (1)

Answers (1)

former_member187563
Contributor
0 Kudos

hi,

You can also use adapter module for this .

the name of adapter module is XMLAnonymizerBean

you can refer to link

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

regards

ujjwal

give points if helpful