on 09-15-2006 2:33 PM
I have a sender mail adapter that picks up emails with file attachments from a mail box using the IMAP transport protocol.
The mail adapter passes processing onto the PayloadSwapBean and then onto a customised module that processes the file attachment (a CSV file).
When I use the messaging system i.e. http://xiserver:port/MessagingSystem/monitor/monitor.jsp
I can see that Content-Type includes the attachment's file name:-
Content-Type: application/octet-stream;name="INV_5016888091848_20060912_00001.csv"
Content-Disposition: attachment;filename="MailMessage.bin"
Content-Description: MailMessage
In my customised module I would like to pick up this file name so that it can be stored in a database table. I have attempted to pick up this file name from the payload using the "getContentType" method of the "XMLPayload" class but this only returns "application/octet-stream" and does not include the file name.
Does anyone know how I can get hold of the above file name using the Adapter Framework API? Or, alternatively, by some other method/approach.
Any help on this would be greatly appreciated.
Hi,
I never used this but an idea.Have a try ..
Please chcek this link -
http://help.sap.com/saphelp_nw04/helpdata/en/8d/a9d240a0a98431e10000000a1550b0/frameset.htm
Please check for Adapter -Specific Message Attributes
->To store adapter attributes in the message header of the XI message, set the Use Adapter-Specific Message Attributes indicator.
The following attributes are added to the XI message header if the sender makes them available, and if you choose Variable Transport Binding.
To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
You can set the details in header with the file names you required like this Variable Header-> XHeaderName1
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apply SP20/12, then it works that way.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon
Was wondering if you were able to find a solution to the problem. If so. could you let us know as well.
Regards
Salil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the method getName in the XMLPayload class.
Hope it works,
Bhanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.