cancel
Showing results for 
Search instead for 
Did you mean: 

Xml file error in file adapter

Former Member
0 Kudos

Hi Experts.

In my sceanrio i am Using File dapter. this adapter pick the Xml file.

here my client provieded sample Xml file (this Xml file don't have the Url and Xml version).

I am getting mapping error. nothing is wrong with mapping.

Client proveded.

- <MESSAGE>

<TABLENAME>ZMPSXMSGDET</TABLENAME>

<ACTION>I</ACTION>

- <RECORD>

<XMTYPE>ID</XMTYPE>

<XMID>2</XMID>

<ACCOUNTNUMBER />

<CONSUMERNAME />

<POSTCODE />

<ACTIONDATE />

<ACTIONTYPE />

<USERID />

<SENDINGPARTYTYPE />

<DELIVERYMETHOD />

<INTENDRECIPIENT />

<SUBMITDATE />

<BILLINGOPTION />

<CONTENTFORMAT>XML</CONTENTFORMAT>

<NEWSUPPLIERID />

<COMPRESSED>Y</COMPRESSED>

<NEXTINVOICEDATE />

<UPDATEDON />

<UPDATEDBY>SonicMQ</UPDATEDBY>

<RAWMSG_LEN>33366</RAWMSG_LEN>

<DATA>UEsDBBQACAAIAC6kKDoAAAAAAAAAAAAAAAArAAAAS</DATA>

</RECORD>

</MESSAGE>

I am getteting blow error message: in SXMB_MONI

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

*- <!-- Request Message Mapping*

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_ZMPSXMSGDET_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_ZMPSXMSGDET_: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Edited by: srinivasreddy p on Jun 12, 2009 10:28 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
here my client provieded sample Xml file (this Xml file don't have the Url and Xml version).

Check this thread on how to add the XML tag and also how to remove the XML tag from the mapping...the method actually followed by the person is by taking haelp from an adapter module...

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

Is XI will read without Namespace in mapping? like this.

- <ns0:MT_ZMPSXTRXMSTPNDG_SEND xmlns:ns0="http://tuas.com/xi/EBT/SonicMQ">

Former Member
0 Kudos

Hi ABHI,

In above blog i saw Java mapping. please tell me how to use this java mapping as per my requirement.

please explain in detail.

Thanks

srinivas

former_member200962
Active Contributor
0 Kudos

The JAVA mapping given in the thread (in my previous reply) needs to be included before the Message mapping in your Interface Mapping...it has to be the first mapping in your IM....

Including a XML tag is a good option as it will solve your problem forever....if you design your mapping to exclude the xml tag then it may happen that you get an error at your receiver end saying XML not well formed or something....

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

I am getting following error in recvier proxy.

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

- <!-- Call Inbound Proxy

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIProxy</SAP:Category>

<SAP:Code area="ABAP">PARSE_APPLICATION_DATA</SAP:Code>

<SAP:P1>Request Message</SAP:P1>

<SAP:P2>CX_ST_MATCH_ELEMENT</SAP:P2>

<SAP:P3>/1SAI/TXS17E9317D0B8ACCD31C62</SAP:P3>

<SAP:P4>XML Bytepos.: 12 XML Path: MESSAGE(1) Error Text: System expected the element 'MT_ZMPSXMSGDET_RECV'</SAP:P4>

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_MATCH_ELEMENT; (/1SAI/TXS17E9317D0B8ACCD31C62 XML Bytepos.: 12 XML Path: MESSAGE(1) Error Text: System expected the element 'MT_ZMPSXMSGDET_RECV')) System expected the element 'MT_ZMPSXMSGDET_RECV'</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

former_member200962
Active Contributor
0 Kudos

Hi,

Your proxy is defined on a MI which is in turn based on some MT.....when you execute the mapping your target structure is not having the root node, MT_ZMPSXMSGDET_RECV, this is causing a mismatch between the structure generated by mapping and that expected by Proxy...please check for this...

Regards,

Abhishek.

Former Member
0 Kudos

HI

How to over come this issuee please explain,

former_member200962
Active Contributor
0 Kudos

Hi,

When you do the mapping between <MESSAGE> (message that you get from the file) and MT_ZMPSXMSGDET_RECV structures make sure that the node MT_ZMPSXMSGDET_RECV is created...check what is the occurence of MT_ZMPSXMSGDET_RECV.....if it is 0..1 (or 0..unbounded) then you need to map it to a constant (atleast) or to the <MESSAGE> node so that you get the rest structure......as of now what may be happening is your mapping is not producing this node (MT_ZMPSXMSGDET_RECV) and hence there seems to be no structure for sending to Proxy...hence the error....or you can even make the occurence of MT_ZMPSXMSGDET_RECV as 1..1.....

I hope that MT_ZMPSXMSGDET_RECV is a root node of the structure on which proxy is configured

Regards,

Abhishek.

former_member200962
Active Contributor
0 Kudos

Ohh.....problem solved....good

Former Member
0 Kudos

Thank you abhi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Have you check the file directly using it in the map using TEST tab.

Just check because i think there is some problem in the file.

Thanks and Regards

Hemant