Hi,
i am executing Text file 2 XML..
i am getting this error, in I.R, when i am trying to execute with XML file generated from SXMB_MONI.
Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
the XML File is
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_Out_Orders xmlns:ns="URN://Text">
- <Recordset>
- <Orders>
<OrderNo>1211</OrderNo>
<Item>Monitor</Item>
<Qty>5</Qty>
<Price>1200</Price>
</Orders>
+ <Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>40</Qty>
<Price>10</Price>
</Orders>
- <Orders>
<OrderNo>1214</OrderNo>
<Item>Headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</Recordset>
</ns:MT_Out_Orders>
-
my incoming Datatype is like this
DT_Out_Orders Orders OrderNo Item Qty Price
my Sender Adapter (File)
Document Name MT_Out_Orders Document Namespace URN://Text Document Offset 0 Recordset Name Recordset Structure Order,* Recordsets per Message * Orders.fieldNames OrderNo,Item,Qty,Price Orders.fieldSeparator , Orders.endSeparator 'nl' Orders.processConfiguration FromConfiguration
Any sugg?
Thanks
Seshu
Hi Seshu,
I do not know of any other way to do this, except by using a BPM.
For BPM configuration, take a look at this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
On this page, go through the tree structure on the left side of the screen. You have many examples of BPM configuration for different scenarios.
Hope this helps!
cheers,
Prashanth
P.S Please mark helpful answers
Hi,
But your post tells me that there is a error in the mapping.
Check your input xml is in valid format ? Because if you copy the xml from SXMB_MONI , you will get - characters.. So it will give error. Delete these and check it.
Refer this to get more.
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Regards,
moorthy
Hi Seshu,
It looks like a mapping error. Please test your mapping in IR with the payload from SXMB_MONI. You can refer michal's weblog for the same.
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
cheers,
Prashanth
P.S Please mark helpful answers
Hi Seshu,
Check with all these things ..
1)In the sender file content conversion dont specify any name space name for the "recordset name space" and try the scenario
2)When you pasted the xml check whether you have any spaces before start of the tag <?xml version="1.0" encoding="UTF-8"?>. If YES, remove the space and test your mapping again.
3)Go to the test tab keep values in the fields and then click on XML and cross check this XML with your message in the SXMB_MONI.This is to check if ur XML is formatted well.
Try these out and let me know.
cheers,
Prashanth
P.S Please mark helpful answers
Seshu,
The problem is the "-" and "+" higlighted below. Remove them and test your scenario.
<i><?xml version="1.0" encoding="utf-8" ?>
<b>-</b> <ns:MT_Out_Orders xmlns:ns="URN://Text">
<b>-</b> <Recordset>
<b>-</b> <Orders>
<OrderNo>1211</OrderNo>
<Item>Monitor</Item>
<Qty>5</Qty>
<Price>1200</Price>
</Orders>
<b>+</b> <Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>40</Qty>
<Price>10</Price>
</Orders>
<b>-</b> <Orders>
<OrderNo>1214</OrderNo>
<Item>Headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</Recordset>
</ns:MT_Out_Orders></i>
Regards,
bhavesh
You just try by giving input like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Out_Orders xmlns:ns="URN://Text">
<Orders>
<OrderNo>1211</OrderNo>
<Item>monitor</Item>
<Qty>5</Qty>
<Price>100</Price>
</Orders>
<Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>5</Qty>
<Price>10</Price>
</Orders>
<Orders>
<OrderNo>1214</OrderNo>
<Item>headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</ns:MT_Out_Orders>
Hi Seshu,
The reason for the error that i am going to satae may not be the problem, but still u can try this. Hopefully the error might be resolved.
In the sender adapter, u have mentioned:
Recordset Structure Order,* (This Order does not end with an 's').
But the file that u are passing has the recordset name as 'Orders'.
Try correcting this.
Regards
Neetu
Add a comment