on 07-09-2008 3:09 PM
I have a sender mail adapter that processes the attached .csv file. All is working fine. I use FCC in module to convert the attachment and pass to an IDOC adapter for processing in SAP system.
My problem is sometimes the sender mail CC fails with ...........
exception caught during processing mail message[1]; com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
It only fails with some files. At the moment when we test we FORWARD the email to our email account. If I detach the failed email attachment and attach it to a NEW email it will then work.
So why does it not work when forwarding emails? But it works when I attach the same file to a new email and send?
Other threads for this error seem to point to encoding. But how do I know which to use. I currently use the following in my module config:
Transfer.ContentType application/octet-stream;charset="ISO-8859-1"
Hi,
Check this URL for Sener Mail Adapter Configuration guide:
http://help.sap.com/saphelp_nw2004s/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
Thanks,
Boopathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"It seems that in a forwarded mail there are additional attachments, which are empty."
This could explain it, but most email attachments that are forwarded work - it's just some that don't. You would have thought it would always do the same thing!
"You can try searching the attachment by content type, if you are sure that the content type is always the same. Is there a pattern for the attachment name?"
The test messages that they send now have all different attachment names - but I can request that they send a particular attachment name. What do I need to do to search the attachment by content type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lynn,
> So why does it not work when forwarding emails? But it works when I attach the same file to a new email and send?
The issue might come from your email client. The email is different, when forwarded.
> Other threads for this error seem to point to encoding. But how do I know which to use. I currently use the following in my module config:
I don't think so.
> Transfer.ContentType application/octet-stream;charset="ISO-8859-1"
charset does not make sense for octet-stream. You can use this for text only (like text/plain)
Do you use the payloadswapbean? Which parameters do you have here?
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have this in my configuration:
localejbs/AF_Modules/PayloadSwapBean on local
TRANSFORM
localejbs/AF_Modules/MessageTransformBean on local
txtxml
TRANSFORM swap.keyName payload-name
TRANSFORM swap.keyValue MailAttachment-1
txtxml Transfer.ContentType application/octet-stream;charset="ISO-8859-1"
txtxml Transform.Class com.sap.aii.messaging.adapter.Conversion
txtxml Transform.ContentDescription MailAttachment-1
txtxml Transform.ContentDisposition attachment;filename="MailAttachment-1.bin"
txtxml xml.conversionType SimplePlain2XML
txtxml xml.documentName MT_BCD_INVOICES
txtxml xml.documentNamespace urn://federalmogul.com/BCDTRAVEL/FINGLOBCD001/00
txtxml xml.fieldNames COST_CENTRE,EMPLOYEE_ID,PRODUCT_GROUP,COMP_CODE,BCD_ACCOUNT,INVOICE_DATE,TRAVELER_NAME,TRAVELER_FIRST_NAME,INVOICE_NO,AMOUNT_EXCL_VAT,CURRENCY1,AMOUNT_VAT,CURRENCY2,AMOUNT_DOC_CURRENCY,CURRENCY3
txtxml xml.fieldSeparator ;
txtxml xml.lastFieldsOptional YES
txtxml xml.processFieldNames fromConfiguration
txtxml xml.structureTitle RECORDSET
With this configuration, you always read the first attachment. It seems that in a forwarded mail there are additional attachments, which are empty.
You can try searching the attachment by content type, if you are sure that the content type is always the same. Is there a pattern for the attachment name?
Regards
Stefan
Hi Lynn,
This document will provide more info about encoding in adapters:
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.