cancel
Showing results for 
Search instead for 
Did you mean: 

xml to idoc ... message mapping ..fatal error

Former Member
0 Kudos

Hi XI friends..

In Xml to Idoc scenario..

i used xsd as external definition..

and i did mapiing between external definition and idoc

when static test it excuted successfully .

the source xml of external definition ..after message mapping in static test



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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>
      <ns1:Units xmlns:ns1="http://aaaaa.org/Units.xsd">
         <ns1:Unit Id="aa" Date="2006-10-10T10:10:10" Value="11"/>
         <ns1:Unit Id="bb" Date="2006-10-10T10:10:10" Value="22"/>
      </ns1:Units>
   </ns0:Message1>
</ns0:Messages>

but i am getting xml like this from external system


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

      <Units xmlns:ns1="http://aaaaa.org/Units.xsd">
         <Unit Id="aa" Date="2006-10-10T10:10:10" Value="11"/>
         <Unit Id="bb" Date="2006-10-10T10:10:10" Value="22"/>
      </Units>
   

when i am trying to convert the above xml into idoc in static test

i am getting

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Document is not well-formed.

plase guide me..

regards

ram

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Ram

Are you trying a N:1 mapping or a 1:N mapping?

if yes, when you change the occurence of the message type in the source or target, the <MESSAGES> tag are introoduced automatically at run time.

You don't need to create the same in the source file. You source XMl is valid. Just ensure that your mapping is correct.

Regards,

Bhavesh

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi friends...

my problem solved...

thank you very much for your help..

keep going

regards

ram

Former Member
0 Kudos

hi friends..

i changed the occurance of idoc to 0..unbounded.

inbound idoc is IMEASR.IMEASR01

i mapped to Unit->IMEASR01 id->>POINT date->IDATE value-->READC

i have source xml file from external system like

<?xml version="1.0" encoding="UTF-8"?>
 
      <Units xmlns:ns1="http://aaaaa.org/Units.xsd">
         <Unit Id="aa" Date="2006-10-10T10:10:10" Value="11"/>
         <Unit Id="bb" Date="2006-10-10T10:10:10" Value="22"/>
      </Units>

when loading above xml intance in static test..message mapping is successfully executed..

but result in static test not getting any values..

please clarify me..

ram

agasthuri_doss
Active Contributor
0 Kudos

Hi,

You might be missing any class files, while Importing, Kindly check it out,

Regards

Agasthuri Doss

Former Member
0 Kudos

Hi friends..

i again loaded my source file from load test instance in static message mapping..


<?xml version="1.0" encoding="UTF-8"?>
 
      <Units xmlns:ns1="http://aaaaa.org/Units.xsd">
         <Unit Id="aa" Date="2006-10-10T10:10:10" Value="11"/>
         <Unit Id="bb" Date="2006-10-10T10:10:10" Value="22"/>
      </Units>

message mapping successfully executed.

but i am not getting result in static test.

please clarify me..

ram

Former Member
0 Kudos

Hi Ram,

What all fileds of idocs you have mapped?

Thanks,

Tuhin

Former Member
0 Kudos

Hi Xi friends..

Thank you very much for your quick responses..

when i try to load the source xml from external system..in static test of message mapping..


<?xml version="1.0" encoding="UTF-8"?>
 
      <Units xmlns:ns1="http://aaaaa.org/Units.xsd">
         <Unit Id="aa" Date="2006-10-10T10:10:10" Value="11"/>
         <Unit Id="bb" Date="2006-10-10T10:10:10" Value="22"/>
      </Units>

message mapping is successfully executed..

but target Idoc does not contain values in static test.

please clarify me..

regards

ram

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Can you again Import the mapping files and try it out,

Regards

Agasthuri Doss

agasthuri_doss
Active Contributor
0 Kudos

Hi,

The Error - fatal error also cause due to mis match of the data type,

Regards

Agasthuri Doss

Shabarish_Nair
Active Contributor
0 Kudos

to test it in static, try the following;

1.goto the test tab of mapping

2. open the xml source representation

3. copy the source XML you are receiveing and paste it between

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

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

and

</ns0:Message1>

</ns0:Messages>

and then continue the test.

your development seems perfect !!!

Former Member
0 Kudos

Hi,

The xml from the external system, is well formed.

1. Make sure, that there are no spaces preceeding the first line, i.e,

<?xml version="1.0" encoding="UTF-8"?> when you are trying out the static test.

2. In case, you donot intend to use N:1 mapping, make sure that the occurence of the source message (under the message tab, in message mapping editor) is 1.

Regards,

Smitha.