cancel
Showing results for 
Search instead for 
Did you mean: 

simple xml file mapping exception

Former Member
0 Kudos

How come a file with this content works fine:

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

<ns:Data xmlns:ns="http://natoil.com/xi/XI/TestFile">

<Name>Joe</Name>

</ns:Data>

But a file with this content gives a mapping exception:

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

<Data>

<Name>Joe</Name>

</Data>

How can I get the second version to work? What am I not understanding?

thanks-

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Henry:)

to achive your scenario:

1. go to the <b>Message Type</b> of your file message (repository)

2. remove <b>XML namespace</b> - you can leave it empty

3. check if your mapping based on this message type works - now it shouldn't show the namespace when you go to <i>Source Document View</i> of the Source message

4. recreate message interface

5. activate it all again

6. now your scenario without the namespace should work:)

Regards,

michal

Message was edited by: Michal Krawczyk

Former Member
0 Kudos

That did it. I knew I was missing something simple! Thanks

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I discoverd it after many, many hours

but know it may seem simple:)

Regards,

michal

ajay_wandre
Explorer
0 Kudos

Hi Michael,

In my file(xml) to RFC scenario, I have removed the XML namespace from message-type; even then I am getting an error message as

'Cannot produce target element /ns1:<Function-module name>. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd.'

But when I append the namespace manually in the xml file; the scenario is processed successfully.

How can I get the namespace automatically appended to the xml file?

Please reply at your convenience...

Former Member
0 Kudos

Here is the trick

Always check in the test of Message mapping or - Interface mapping.

see the tags the attribute to your data element is missing.

xmlns:ns="http://natoil.com/xi/XI/TestFile

is missing.

Always follow the tags in the test file created by test.

Edited by: sanju XI on Aug 19, 2008 1:19 PM

Former Member
0 Kudos

Try now..it should work guranteed

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

<Data xmlns:ns="http://natoil.com/xi/XI/TestFile>

<Name>Joe</Name>

</Data>

Answers (0)