cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem with use of Mail Adapter in scenario Mail to File

Former Member
0 Kudos

I am working on a scenario Mail to File. I send an emailmessage and a attachment where I use a message mapping to map the email to my datatype for the use of BPM.

The input message (email) =

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

- <!-- Request Message Mapping

-->

- <xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30">

<Subject>Testmail from mail to XI</Subject>

<From>"Roy" <roy@uphantis.com></From>

<To>"SAPXI" <sapxi@uphantis.com></To>

<Content_Type>text/plain;charset="iso-8859-1"</Content_Type>

<Date>2006-12-01T14:13:10Z</Date>

<Message_ID><43117E2CF9F45947B53F95BAE67BEEEA479377@.uphantis.lan></Message_ID>

<Content>This is a test message</Content>

</xim:Mail>

In my message mapping you can test the mapping.

My mapping code =

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

<ns0:Mail xmlns:ns0="urn://UPHANTIS/Masterclass_SAP_XI/MailCollectFile">

<Subject/>

<From/>

<To/>

<Content_Type/>

<Date/>

<Message_ID/>

<Content/>

</ns0:Mail>

When I try to test the message which I received from the email, I get a mapping error.

This error is because in my mapping I use:

<ns0:Mail xmlns:ns0="urn://UPHANTIS/Masterclass_SAP_XI/MailCollectFile">

and in my email SAP it is <xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30">

Because when I replace "http://sap.com/xi/XI/Mail/30" with "urn://UPHANTIS/Masterclass_SAP_XI/MailCollectFile" in the testing of the message mapping it works. (message mapping is okay)

Is there anyone who knows how you can replace "http://sap.com/xi/XI/Mail/30" with my own used namespace? maybe of the use with a module?

Greetings

Roy

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Hi Roy,

do it the other way round. Change your namespace in the message type. The default XML namespace is the same as the namespce of your message type object, but you can overwrite it.

After changing the XML namespace of the message type, you have to reassign the message type to the mapping.

Regards

Stefan

Answers (0)