on 11-18-2014 8:38 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.