cancel
Showing results for 
Search instead for 
Did you mean: 

XML Not well formed, Mapping error

Former Member
0 Kudos

Hi All,

I'm trying a simple file to file scenario..

Following is the structure of source and target file..

Source structure

===============

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

<ns:SourceMT xmlns:ns="urn:tmp:workshop:file2file">

<Src1>1</Src1>

<Src2>2</Src2>

</ns:SourceMT>

Target Structure

===============

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

<ns:TargetMT xmlns:ns="urn:tmp:workshop:file2file">

<Tgt1>1</Tgt1>

<Tgt2>2</Tgt2>

</ns:TargetMT>

I did a one to one mapping for the two fields and tested the same using the test tool in IR and it works fine..

However when I put the same source xml structure in the Input file it gives me the below error..

Also when I copy the payload from the sxmb_moni and paste the same in the test tool in IR it throws an error saying

"XML not well-formed"

Error

=====

<SAP:Stack>During the application mapping com/sap/xi/tf/_FileMM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

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

</SAP:Error>

Payload

=======

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

- <ns:SourceMT xmlns:ns="urn:tmp:workshop:file2file">

<Src1>1</Src1>

<Src2>2</Src2>

</ns:SourceMT>

Any inputs are greatly appreciated..

Thanks and Regards,

Nazim

Accepted Solutions (0)

Answers (3)

Answers (3)

udo_martens
Active Contributor
0 Kudos

Hi Nazim,

you copied it from the surface of SXMB_MONI. The surface is a splitter container with internet explorers. So you copied the view of the internet explorer and its showing a "minus" for every node. Use the context menu "show source code" and the xml will appear in notepad, where you can copy the "real" XML. Try again to use the test tool to find out the runtime error.

Regards,

Udo

former_member206604
Active Contributor
0 Kudos

Hi,

In the Message mapping go to the test tab and give some values and do a test hope it works fine. Copy the XML source in the source message tab and use it as input file. Then check it it is working fine..if everything is fine then your source file is not as expected format.

Thanks,

Prakash

Former Member
0 Kudos

Hi Nazim,

how do you copy the payload?

a) Did you remove the whitespace in front of <?xml version="1.0" encoding="utf-8" ?>

b) Did you remove the "-"?

Regards Mario

Former Member
0 Kudos

Hi ,

<i>During the application mapping com/sap/xi/tf/_FileMM_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</i>

It is clearly saying that exception in mapping....Check your mapping correcly with one to one mapping.Dont do any mapping to the root node and check it...

And also check this...

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Sekhar