cancel
Showing results for 
Search instead for 
Did you mean: 

Executing source message which is coming without namespace ?

Former Member
0 Kudos

Hi All ,

I am doing xml to IDOC scenario and i got source XML like

<?xml version="1.0" encoding="UTF-8"?>

<Delivery>

<Data>

<OderNo>100</OrderNumber>

<Line Number>10<Line Number>

<Division>01<Divison>

<Status>10<Statyus>

</Data>

</Delivery>

When I do Test Mapping from Message mapping and also from File server location and its giving error saying that it can create a target element .

Then I added namespace the xml and tested its working fine .

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Delivery  xmlns:ns0="http://xxxxx/xx/Status>

<Data>

<OderNo>100</OrderNumber>

<Line Number>10<Line Number>

<Division>01<Divison>

<Status>10<Statyus>

</Data>

</ns0:Delivery>

I know that we need to add ns:0 while testing.

Legacy team is not willing to send namespace in the xml file . Now I am adding ns0 and namespace with the help of xslt mapping and added as intermediate step in operation mapping to execute the source xml which is coming without namespace .

Is there any alternative to process xml messages coming without namespace ?

Br

Mohanaa

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Mohan,

The problem is in your target schema that you have defined that namespace. You should omit it there. There are another alternatives like to use a XSL or to use XMLAnonymezerBean but in your case will be a woraround when you have a correct choice to do.

I usually do an external XSD to import and remove the namespaces in that file before the importing.

Regards.

Former Member
0 Kudos

Thanks Inaki !

Here source data type is not not XSD and its created by me and its not executing without adding namespace and ns0 and to  overcome this issue and i did xslt mapping to add namespace added in operation mapping .

Is there another way to execute source message whoch is coming without namespace apart from  executing xslt mapping or  XMLAnonymezerBean ?

Br

Mohanaa

Former Member
0 Kudos

Hi Mohan,

From the MT, you can copy the schema definition, remove the namespace and import it as external schema definition,

as suggested by Inaki.

Regards,

Alka Panday.

Former Member
0 Kudos

Thanks Alka ! Its worked .

Former Member
0 Kudos

Thanks Inaki ! its worked.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

>>Now I am adding ns0 and namespace with the help of xslt mapping and added as intermediate step in operation mapping to execute the source xml which is coming without namespace .

This thread has been answered but still would like to add that u don't need XSLT or import/export of MT XSD to remove source message namespace.

Simply remove the "xml namespace" section from the message type and refresh ur messgae mapping...You will see ur source message without any prefix and namesapce.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit! Grt..Its working with message types by simply removing namespace from MT it self.