Hi
I wish to read an XML file coming from another system and then update my data base using RFC.
The problem is that the incoming file does not contain a namespace tag which XI understands
(For e.g. <ns:UpdateTablexmlns:ns="urn:BuisScenario:TEST">)
Due to which it is not reading the data contained in the file.
If I use the XML file which is generated through XI then it is working fine as it contains the relevant namespace.
But as my XML file is coming from a different system and is not generated by XI, I wish to know how can we add the namespace tag to it so that XI can understand the file. Or is there any other way in which the file can be read.
Has anybody face similar problem?
Hoping for a quick response.
Regards
Satish
Hi Satish,
XI should be able to read any xml.
Do you use the file-adapter?
What do you see in SXMB_MONI?
Regards Udo
Hi Satish,
I am not sure whether I get you right.
I assume you have defined a Datatype in the integration repository reflecting the structure of your XML. Then you have defined a Message Type based on the Datatype.
Finally you have used this Message Type to define e.g. a Message Mapping. Then the Message Mapping does not work if the namespaces do not match.
If this assumption is correct I recommend to change the XML namespace in the definition of the Message Type. This is possible in XI 3.0.
Unfortunately, in this case you will probably have to redefine your mapping.
Greetings
Stephan
Hi Stephan
The problem of namespace is solved now, what I did was, I followed your suggestion and I have left the field for XML Namespace in the message type empty and the scenario works. Now I am facing another problem.
My incoming XML file looks like as given below:
<Case_Details>
<Case1> <Case_EPC>1232312313313</Case_EPC> <Item_ID>PR001</Item_ID> <Quantity>50</Quantity> </Case1>
<Case2> <Case_EPC>1232312313314</Case_EPC> <Item_ID>PR002</Item_ID> <Quantity>200</Quantity> </Case2>
<Case3> <Case_EPC>1232312313315</Case_EPC> <Item_ID>PR003</Item_ID> <Quantity>520</Quantity>
</Case3>
</Case_Details>
The problem is when I duplicate the cases while testing the message mapping I do not get the desired result as the tag names are different. The mapping which I have done does not cater for Case1, Case2, Case3 coming in the incoming XML file, Instead of this only case tag comes without the numbering(1,2,3) due to which my fields are not getting populated.
The sample XML generated from my mapping is given below.
<Case_Details>
<Case> <Case_EPC>1232312313313</Case_EPC> <Item_ID>PR001</Item_ID> <Quantity>50</Quantity> </Case>
<Case> <Case_EPC>1232312313314</Case_EPC> <Item_ID>PR002</Item_ID> <Quantity>200</Quantity> </Case>
<Case> <Case_EPC>1232312313315</Case_EPC> <Item_ID>PR003</Item_ID> <Quantity>520</Quantity>
</Case>
</Case_Details>
So in this scenario the different cases do not have numbering and thus the mapping fails when the original XML file is the input.
Kindly advice what is to be done.
Regards
Satish
Add a comment