Showing results for 
Search instead for 
Did you mean: 

Adapter Module Error-Sending excel file as an attachment of the mail

0 Kudos

Hi ,

My scenario is as follows

1)I am sending an excel file as an attachment of the mail.I need to read that excel attachment as a payload.

So mail adapter is used in sender side.

To configure this, have used standard PayloadSwapBean module with proper module key.

Next to convert excel to XML another custom adapter module is being used.

Both this adapter module , I configured into the CC of sender mail adapter.

The order in which adapter modules are being used in the sender CC are as follows




MDPExcelToXMLConversion-Custom adapter module written to convert excel to xml.

I am getting the following error

exception caught during processing mail message [4899]

And also,

no messages in coming MONI of PI.

Pls suggest what to do.



Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

always use logging and trace in any custom module you write.

thus in case it is an error inside the module, you will be able to figure out what happened.

0 Kudos


Will the ordering in which the adapter modules(In this case there are two-PayloadSwapBean & MDPExcelToXML) are appearing into Module tab of sender adapter matter?

Firstly, what is happenning

1)If I take out the custom adapter module MDPExcelToXML and put only PayloadSwapBean then it is successfully converting mail attachment into the main Payload i.e PayloadSwapBean module is working.

2)Nextly, my local code( i.e java code without including standard Module specific method like ejbActivate(),ejbPassivate(),process() etc etc.)) for MDPExcelToXML is successfuly converting the excel file into the XML file.Then I am making the local code into adapter module specific code and deploying that.

A few question arises here,

Do I need to do any specific configurations here in PI for this particular things.Maybe both the adapter module is clashing with each other.

And also using tracing and logging into my custom adapter module code.Getting the following error, Unable to read entire header; 116 bytes read; expected 512 bytes#



0 Kudos

Hi All,

The problem is fixed now.

In this particular case, for sending Excel file as an attachment I am using PayloadSwapBean and custom adapter module MDPExcelTOXML.

While using PayloadSwapBean, apart from using paramter values Content-Description and Content-Disposition , we need to use one more parameter Content-type and the value of this parameter is application/




The sequencing is as follows

1)PayloadSwapBean-For exchanging mail attachment as the main payload

2)MDPExcelToXML-For converting excel to xml.

A little bit addition,

While writing custom adapter module code pls use proper logging and tracing and include S.O.P(println) in your code in different places of your code so that in case any error happens due to custom adapter module code ,you will find that in the Server Log.

Hope it clarifies.

Answers (2)

Answers (2)

0 Kudos

Problem solved..

0 Kudos

try using your MDPExcelToXMLConversion at receiver adapter. Then you can come to know whether your module having problem or not. You can check sxmb_moni, whether your xl file is displaying with proper format.