on 02-19-2010 7:32 PM
Hi,
I have query related to receiver Email adapter. I am able to run a scenario for 2 attachments in receiver mail adapter scenario.
My scenario is that I am picking up the multiple files using sender file adapter "additonal fiiles" fucntionality and and post the two files as attachments in receiver email adapter. I am picking up two formats: .xml file and PDF and successfully attached to the receiver email adapter.
My query is is related to Standard module processors sequence.
For 3 files in mail attachments(.xml , pdf & .txt) what should be the module processors sequence in receiver email adapter?
Currently I am using the following module processors sequence
1 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans2
2 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swap
3 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans1
4 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
swap -> swap.keyName -> payload-name
swap> swap.keyValue> file1
trans1> Transform.ContentDescription>file1
trans1> Transform.ContentDisposition>attachment
trans1> Transform.ContentType>application/pdf;name="file1.pdf"
trans2>Transform.ContentDescription>file1
trans2>Transform.ContentDescription>inline
Can any body tell me what should be the sequence of module processors and the associated parameters so that all formats(.xml , pdf & .txt) should go as an attachments in the reciever email adapter.
Thanks & Regards
Prabhat
it would be something like this, Try this
1 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swaptxt
2 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans3
3 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swapxml
4 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans2
5 localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swappdf
6 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean trans1
7 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
swapxml -> swap.keyName -> payload-name
swapxml> swap.keyValue> file2
swappdf -> swap.keyName -> payload-name
swappdf> swap.keyValue> file1
trans1> Transform.ContentDescription>file1
trans1> Transform.ContentDisposition>attachment
trans1> Transform.ContentType>application/pdf;name="file1.pdf"
trans2>Transform.ContentDescription>file2
trans2>Transform.ContentDisposition>attachment
trans2> Transform.ContentType>application/xml;name="file2.xml"
trans3> Transform.ContentDescription>file3
trans3> Transform.ContentDisposition>attachment
trans3> Transform.ContentType>application/txt;name="file3.txt"
mail --> mime.contenttype --> multipart/mixed
I have not tried this myself. but it should work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can anybody reply to my query, I am eagerly waiting for the solution
Any correct answer to this will be appreciated
Thanks & Regards
Prabhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this out
Processor Sequence:
localejbs/AF_Modules/MessageTransformBean -> trans
Module Configuration:
trans -> Transform.ContentDisposition -> attachment;filename="xxx.xml"
trans -> Transform.ContentType -> application/xml
trans -> Transform.ContentDisposition -> attachment;filename="xxx.pdf"
trans -> Transform.ContentType -> application/pdf
trans -> Transform.ContentDisposition -> inline;filename="xxx.txt"
trans -> Transform.ContentType -> text/xml
Hi,
I have another query too, suppose I have got the three files as an attachment in email as file1.pdf, file2.txt and file3.xml(main payload). Now I want dynamic attachment name for file3.xml which is main payload in email , how can i do it in mail adapter, can any body give solution to this?
Thanks & Regards
Prabhat
Hi Prabhat,
Use mail package and do as mentioned in this wiki page
http://wiki.sdn.sap.com/wiki/display/SI/DynamicEmailAttachmentnameforReceivedMails
Regards
Suraj
Hi,
The solution suggested might not fulfill my requirement for the below mentioned reasons
1) I am using standard module processors to get file1.pdf and file2.txt
2) to get the dynamic name for .xml if we use the mail package in mail adapter then my module processors wont be used and hence file1.pdf & file2.txt will be lost and mail will be having attachments only in .xml
My requirement is
to get the threefiles in mail as an attachments in the following name : <dynamic name>.xml , file 1.pdf & file2.txt
I am able to get thre files in the attachment as untitled.xml , file1.pdf & file2.pdf
Please provide me the solution how to get untitled.xml as <dynamic name>.xml
I hope I am able to clarify my points
Thanks & Regards
Prabhat
Hi Prabhat,
I still believe it can be done with the mail package, if you want to keep attachment (And their names) preserved in operation mapping then keep the Read attachments opton checked in the operation mapping.
now your operation mapping should have
1. a java mapping (you can take the code form )
2. normal graphical mapping
The java mapping will put the entire source xml to the content node of the target. Then the graphical mapping will help you to put the content type name as per the wiki and also to assign the content (from the xml output of java mapping) to the xsd schema.
Give it a try
Regards
Suraj
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.