cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Sender mail adapter : mail attachment is not converted from plain2xml

Former Member
0 Kudos

Hello all,

I have a problem with the mail adapter.

The situation is as follows.

At the moment I'm using this adapter to read a mailbox (Exhange 2003). The mails contain an attachment (flatfile).

This flatfile is converted to XML using the adapter modules. This works fine.

However now we are going to use Exhange 2010. And I'm currently testing the interface reading this mailbox.

The problem is that the attachments are not converted to XML anymore.

And I get the following error in PI during the mapping step: "com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file"

Because it is trying to process an empty payload.

Below I have added the settings for the module parameters.

Does anyone experienced the same problem, or knows how to solve this?

The PI version is 7.1

I hope someone can help me with this...

Plain2XML Transform.Class                                             com.sap.aii.messaging.adapter.Conversion

Plain2XML Transform.ContentType                                  text/xml;charset=utf-8

Plain2XML ignoreRecordsetName                                    true

Plain2XML xml.HuurderRecord.fieldFixedLengths           2,9,2,9,108,24,5,12,6,18,8,7,1,6

Plain2XML xml.HuurderRecord.fieldNames                         

    RecordCode,FiscaalNummerVerhuurder,SubnummerVerhuurder,Burgerservicenummer,NaamAanvrager,Straatnaam,Huisnummer,HuisnummerToevoeging,Postcode,Woonplaats,Ingangsdatum,Toeslagbedrag,Leeg,Termijn

Plain2XML xml.HuurderRecord.keyFieldValue                20

Plain2XML xml.SluitRecord.fieldFixedLengths                 2,9,10,9,2,124

Plain2XML xml.SluitRecord.fieldNames                         

    RecordCode,AantalHuurders,Totaalbedrag,FiscaalNummerVerhuurder,SubnummerVerhuurder,Reserve

Plain2XML xml.SluitRecord.keyFieldValue                     30

Plain2XML xml.VoorloopRecord.fieldFixedLengths        2,9,2,10,8,6,15,165

Plain2XML xml.VoorloopRecord.fieldNames                                                                                         

    RecordCode,FiscaalNummerVerhuurder,SubnummerVerhuurder,RekeningnummerVerhuurder,BestandDatum,Termijn,ProductieDatumTijd,Reserve

Plain2XML xml.VoorloopRecord.keyFieldValue               10

Plain2XML xml.conversionType                                      StructPlain2XML

Plain2XML xml.documentName                                      HuurtoeslagMail

Plain2XML xml.documentNamespace                             urn:ymere:int:belastingdienst:PC2_E08b

Plain2XML xml.keyFieldName                                         RecordCode

Plain2XML xml.keyFieldType                                           CaseSensitiveString

Plain2XML xml.processFieldNames                                fromConfiguration

Plain2XML xml.recordsetName                                        RecordSetNameToBeRemoved

Plain2XML xml.recordsetStructure                                   VoorloopRecord,1,HuurderRecord,*,SluitRecord,1

ReplaceAll regEx                                                             </?RecordSetNameToBeRemoved>

ReplaceAll replacement

swap swap.keyName                                                        Content-Disposition

swap swap.keyValue                                                        attachment;filename="802605722_01.txt"

Kind regards

Marco van Iersel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Marco,

Try to add the below parameters -

Module Key              Parameter Name             Parameter Value

-------------               --------------------              --------------------

TRANSFORM          swap.keyName                Content-Type

TRANSFORM          swap.keyValue                text/plain

Regards,

Ashish

Former Member
0 Kudos

Hello Ashish,

Thanks for your reply.

I've added these keys but it still did'n't work.

Do I also need to change or delete keys I mentioned above?

Or do you have other ideas?

Kind regards,

Marco van Iersel

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You might want to check this link and also refer the section " General Errors regarding the scenario"  parameter value issue and see if that helps.

http://scn.sap.com/people/gaurav.agarwal11/blog/2012/04/12/handling-attachments-in-mail-to-file-scen...