on 12-04-2009 12:46 PM
Hi all.
we are doing a interface from file to Mail (Excel file as a attachment).
we have written the adapter module to convert the XML from PI to Excel.. which is working fine.
For the attachment name i was hardcoding the attachment name using
localejbs/AF_Modules/MessageTransformBean
and Transform.ContentDescription as Testing.xls.
The scenario works fine.
But i want the attachment name to be dynamically set like xyzddmmyyyy.xls.
I am not using any Mail package.
I want to set the attachment name dynamically. so i follwed the blog
i am getting the filename from the xmlpayload and setting it using
xp.setName(filename);
xp.setContentType("application/vnd.ms-excel");
xp.setContent(by);
but the problem is that now i am not getting the excel file instead a untitled.bin file which have the Contents.
in module configuration i have
localejbs/XMLToExcelConversion LocalEnterpriseBean 0
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean LocalEnterpriseBean 1
Can you please throw some light on this problem..
Thanks in advance
Babu.
Try this:
xp.setContentType("application/vnd.ms-excel; filename=\""filename"\");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is solved using the adapter modules..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.