cancel
Showing results for 
Search instead for 
Did you mean: 

Is Namespace in XML top node Necessary??????

Former Member
0 Kudos

Hi friends,

I am testing File(XML)-XI-IDOC scenario..

My Data Type is

Structure Category Type Occurance

Store_GRN Complex (Data Type)

GRN Element 0..999 (Header Node)

GRN_NO Element string 0..1 (Element)

If I am testing with following XML then SXMB_MONI showing mapping error:-

<Store_GRN>

<GRN>

<GRN_NO>12345</GRN_NO>

</GRN>

</Store_GRN>

But If I am testing with following XML then SXMB_MONI don't show any error and IDOC success fully generated in SAP...

<ns:msgStore_GRN xmlns:ns="http://ABC.com/Warehouse">

<GRN>

<GRN_NO>12345</GRN_NO>

</GRN>

</ns:msgStore_GRN>

<b>IS it necessary that Top most node (Data Type name) in XML start with [ns:msg] & end with [ xmlns:ns="http://ABC.com/Warehouse"]</b>??????

i.e. Is it necessary that, top most node in XML name which is Data element name contain's Namespace of that scenario....?????????????

Because in my case only XML contains Namespace in top node is successful. Is there is any way so that my first XML also successfully loaded.

Thanks & Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Umesh,

The namespace is necessary if you are using BPM in the scenario, otherwise you can take if off from the Message Type field XML Namespace and then test your scenario ..It should work then.

Thanks

Advait.

Answers (3)

Answers (3)

former_member189719
Participant
0 Kudos

Hi Umesh,

If your Message Type is defined in a namespace, then this XML namespace is required. Also the top node is constructed from the MessageType Name.

Both these parameters are used during mapping.

If your root node parameters are wrong , the rest of your steps will go well but when it hits the mapping , it will throw an error saying, your XML does not match the XSD defined.

Hope this info is of help

Dilip

Former Member
0 Kudos

Hi Umesh,

Your xmls are completelly different ones according to the XML specification.

If your datatype declares that it is in some namespace then your xml instance must fulfill this requirements.

It might be that in some cases ABAP proxy doesn't check it but that's not a good idea to rely on that. Later on this behaviour can change to fulfill specification requrements and your use case will fail.

Best regards

Dmitry Yankovsky

Former Member
0 Kudos

Its necessary to have the [ns:msg]...but u can remove the xmlnamesspace.....take it off frm the data type screen.