cancel
Showing results for 
Search instead for 
Did you mean: 

XI3.0 MailAdapter: Problem with receiving mails from Mailserver

Former Member
0 Kudos

Hi all,

I tried to set up a scenario using the mail adapter as the sender and the file adapter as the receiver.

The problem is that the mailadapter logs in into the mailserver but then it stops working with an error.

Here is my setup of the MailSenderChannel:

Transport Protocol: IMAP4

Message Protocol: XIPAYLOAD

Adapter Engine: Integration Server

URL: IMAP://mailservername

User: ****

Password: ****

Mailattributes: Use Mail Package & Keep Attachments is checked

Namespace and Interfacename is also filled in.

The Error Message is as follows:

#1.5#000255AF6C53005500000BC8001010520003E93BC7109362#1100867882226

#/Applications/ExchangeInfrastructure/AdapterFramework/SAPLibraries/SAPXDK#

#com.sap.aii.messaging.srt.xmb.XMBIMAPInitiatorServiceImpl.run()#J2EE_GUEST

#0####da269f003a2711d98349000255af6c53#output##0#0#Error#1

#com.sap.aii.messaging.srt.xmb.XMBIMAPInitiatorServiceImpl#Plain##

#exception caught during processing mail message; java.lang.StringIndexOutOfBoundsException:

String index out of range: -1#

I guess this message came up because my interface definition is wrong. How does the Datastructure for an incoming mail look like? I just defined one field as string to keep the whole email message. Does this work or do I need to have some kind of standard xsd for mail?

Thanks in advance!

/Michael

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

we tried to use the mail-adapter but we defined the Interface-Object for the mail (like notice 748024) in the wrong namespace.

Check that the namespace is xmlns:ns="http://sap.com/xi/XI/Mail/30" as defined in schema.

Norbert Kaps

Former Member
0 Kudos

Hi all

I have the same error when I try to receive mails from my email account with the XI sender adapter:

exception caught during processing mail message; java.lang.StringIndexOutOfBoundsException: String index out of range: -1

As Exchange Infrastructure 3.0 I use Service Pack 10

In the Repository I imported the ximail30.xsd as external definition and created an Outbound interface MI_Mail_out and an Inbound Interface MI_Mail_in. Both include the message Mail of ximail30.xsd.

In the Directory I created a Mail Sender adapter:

Transport protocol IMAP4

Message protocol XIPAYLOAD (I also tried XIALL)

The URL is imap://host plus the user and passwort (these values are ok)

I checked Use Mail package with base64.

As interface namespace I tried http://sap.com/xi/XI/Mail/30 and name Mail.

I also tried as namespace my namespace from the Repository plus MI_Mail_out.

As quality of service I use Best Effort.

I also created sender agreement and so on...

In the inbox of the email-account are 3 messages 2 unread an 1 read with no special signs and no attachments.

But I still get this exception.

How did you solve your problem ?

Thanks for your help.

Simon

Former Member
0 Kudos

Simon,

I have the same setup as you had and is getting the same error message. Were you able to get your scenario working? If so, what did you do?

Thanks

Former Member
0 Kudos

Hi again,

is there nobody out who knows how to get emails into XI?

Brgds

/Michael

Former Member
0 Kudos

Hi Michael,

Change your message protocol to XIALL and this means the structrure can be any format I think. I am just working through setting up mails from XI and this is a question I raised by had no response.

Also, check OSS for XI Mail. This should give you some pointers.

Kind regards

Colin

Former Member
0 Kudos

Hi,

The schema is available in OSS note 748024

Cheers

Colin

Former Member
0 Kudos

Hi Colin,

thank you for your hint with the OSS note. I tried this schema for incomming email message but still get the same error as mentioned above. The error also doesn't change if I change to XIALL. Then you can see two more errors in the log file saying that there is no interface and namespace defined.

Have you tried to read an email with xi?

Brgds

/Michael

Former Member
0 Kudos

Hi Michael,

My scenario is a basic sending out of XI but the set-up of the objects in the design and configuration parts of the Builder should be the same.

Post your objects from the design side first and we will see if they are set up as mine are.

Perhaps you can help me also.

My scenario is to generate an e-mail out of XI. If I have issues on the Mail Adapter side, where do I see the log details for this ?

Thanks

Colin.

Former Member
0 Kudos

You can find the error messages in the XI logfile in the directory:

/usr/sap/.../j2ee/cluster/server0/log/applications/com.sap.xi

How shall I post the design objects here in this forum?

Regarding my scenario: The mailadapter seems to read the email from the mailbox but I cannot see any message in the RWB. So it craches before with the error above.

Former Member
0 Kudos

Hi,

Cheers Michael. I thought this was where I would see any errors but needed confirmation

Post your design objects here and I will compare them with mine.

Cheers

Colin

Former Member
0 Kudos

Hi Colin,

here comes the WSDL description of my message interface to receive the email:

<?xml version="1.0" encoding="ISO-8859-1"?>

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:p1="http://sap.com/xi/XI/Mail/30" name="MI_Mail_into_XI" targetNamespace="http://sap.com/xi/XI/Mail/30">

<wsdl:types>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/Mail/30" targetNamespace="http://sap.com/xi/XI/Mail/30">

<xsd:element name="Mail" type="Mail" />

<xsd:complexType name="Mail">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

51f7dac03ede11d9c348000255af6c53

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="Subject" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d2fbcb03ebc11d9a926ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="From" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d2fbcb13ebc11d9bd23ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="To" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143503ebc11d9bef6ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="Reply_To" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143513ebc11d9941fff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="Content_Type" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143523ebc11d980f2ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="Date" type="xsd:dateTime" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143533ebc11d9b24fff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="Message_ID" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143543ebc11d9cbc5ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="X_Mailer" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143553ebc11d9ce16ff790a50fa78

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="Content" type="xsd:string" minOccurs="0">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

8d3143563ebc11d9979cff790a50fa78

</xsd:appinfo>

<xsd:documentation xml:lang="EN">

any type

</xsd:documentation>

</xsd:annotation>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

</wsdl:types>

<wsdl:message name="Mail">

<wsdl:part name="Mail" element="p1:Mail" />

</wsdl:message>

<wsdl:portType name="MI_Mail_into_XI">

<wsdl:operation name="MI_Mail_into_XI">

<wsdl:output message="p1:Mail" />

</wsdl:operation>

</wsdl:portType>

<ifr:properties xmlns:ifr="urn:com-sap:ifr:v2:wsdl">

<ifr:category>

ifmmessif

</ifr:category>

<ifr:methods>

<ifr:method name="MI_Mail_into_XI">

<ifr:isSynchron>

false

</ifr:isSynchron>

<ifr:isInbound>

false

</ifr:isInbound>

<ifr:interfaceCategory>

outbound

</ifr:interfaceCategory>

</ifr:method>

</ifr:methods>

<ifr:messages>

<ifr:message name="Mail">

<ifr:messType>

ifmmessage

</ifr:messType>

<ifr:technicalNamespace>

http://sap.com/xi/XI/Mail/30

</ifr:technicalNamespace>

</ifr:message>

</ifr:messages>

</ifr:properties>

</wsdl:definitions>

Former Member
0 Kudos

Hi Michael,

On your RWB monitoring under Message Montitoring, you should be able to see two components to monitor, one for the Adapter Framework and one for the Integration Server.

What do you see under the Adapter Framework for the messages ?

Cheers

Colin.

Former Member
0 Kudos

Hi Colin,

I also tried this before but the only thing I can see is an error message telling me that "The page cannot be displayed"

Is there any other way to see thsi log, eg. from the ABAP stack? Or do you know where to set the right link for this page?

/Michael

Former Member
0 Kudos

Hi Michael,

OK - we won't worry about that side for the moment although it is Basis who be able to get this part working.

I now have a working outbound scenario.

This is what needs to be created on the design side :

1. Data types - one for e-mail and one for destination object

The e-mail structure can be anything you like. I have 2 fields for vendor number and message

2. Message types - one for e-mail and one for destination object. These are obviously linked to your data types you created

3. Message interfaces - one for inbound from Mail Adapter and one for outbound to your destination adapter. These will use your message types you just created.

Does this help at all ?

Another piece of advice from you is needed - do you know how to set the body of the e-mail. At the moment when you sent an e-mail from XI, all you get is a blank e-mail with an XML file showing your details according to your message type. I really want to be able to just set the body of the e-mail, I am not bothered by the XML content.

Cheers

Colin.

Message was edited by: Colin Bickell