cancel
Showing results for 
Search instead for 
Did you mean: 

Mail package: missing end tag error

0 Kudos

Hi All

I am using mail package for my receiver mail adapter.

I have the required configuration for mail package as shown below:

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

<Subject>Test Subject</Subject>

<From>From Sender</From>

<To>To Sender</To>

<Content_Type>text</Content_Type>

<Content>

<Valid_Object>1000006-AAA-AAA</Valid_Object>

<Company_Code>1001</Company_Code>

</Content>

</ns1:Mail>

I get the following error in the communication channel monitoring:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content at state 1

How can i set this expected end tag?

I thought </ns1:Mail> is the end tag and it is defined properly.

Thanks

Chandra

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Thanks Stefan

Former Member
0 Kudos

Is this XSD downloaded from Service Market place and uploaded as XSD. And used in the receiver message interface.

We have a lot of mail interfaces if you can explain more i will be able to help you out.

0 Kudos

Hello Sebin

I have a proxy to mail scenario.

I am extracting data from SAP and I have to send it in email as a text attachment.

So, i am using mail package. My message type is as follows (as suggested by documentation):

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

<Subject>Test Subject</Subject>

<From>Sender email</From>

<To>Receiver email</To>

<Content_Type>text</Content_Type>

<Content>

<Valid_Object>1000006-AAA-AAA</Valid_Object>

<Company_Code>1001</Company_Code>

</Content>

<Content>

<Valid_Object>1000006-BBB-BBB</Valid_Object>

<Company_Code>1002</Company_Code>

</Content>

</ns1:Mail>

I also checked 'keep attachments' option. I am not using adapter specific message attributes for mail adapter.

Now, i am getting the following error in communication channel monitoring:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException:

com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content at state 1

I have a start tag "http://sap.com/xi/XI/Mail/30" as suggested by documentation.

I thought, end tag can only be </ns1:Mail> which closes initially opened start tag with the same name.

What is the mistake here? How can i get the end tag?

Many Thanks

Chandra

Former Member
0 Kudos

For using this mail message you need to download or refer the XSD from marketplace

Rajesh

Former Member
0 Kudos

What is the message protocol and transport protocol you are using

Try using XIPAYLOAD and SMTP

stefan_grube
Active Contributor
0 Kudos

It is not allowed to reat the content tag.

And it does not make sense to have several root nodes in an XML, so check how the result should look like and change the mapping accordingly.

For example:

<Content_Type>text</Content_Type> 
<Content>
<root>
<line>
<Valid_Object>1000006-AAA-AAA</Valid_Object> 
<Company_Code>1001</Company_Code>
</line>
<line> 
<Valid_Object>1000006-BBB-BBB</Valid_Object> 
<Company_Code>1002</Company_Code>
</line>
</root> 
</Content>