on 08-07-2014 8:49 AM
Hi Experts,
I have a requirement where there are two files in PI AL11 Directory,let say file.xml and file_test.xml.
I want to send file.xml as the main payload and file_test.xml as the attachment.In the target side I want to have the entire xml content of the file "file.xml "as the mail body and "file_test.xml" as the attachment.I am getting the xml content as the mail body as required and also the attachment as required but problem is I am getting file.xml whose content should only be in my mail body as an additional attachment where I need only file_test as the attachment in my mail in short I am getting 2 attachment file.xml and file_test.xml where I need only one i.e;file_test.xml.
I have implemented it in following ways:
a) Mail package is used as the receiver structure.
b) Following mapping is done in ESR:
emailid----->To
emailid---->From
application/xml----->Content_Type
filename----->ContentDescription
inline;filename="filename"----->Content_Description
return as xml(root source message)------>Content
c) In the sender file adapter:
file.xml as the source filename and the relevant directory name
checked the option Additional File
put the name as file_test
file_test.namePart ".xml"="_test.xml"
file_test.optional NO
d) In the receiver mail adapter I have checked the mail package format and the keep attachment option.
In the Module tab I have done the following configuration:
I have gone through all the Links available in SDN for the solution of this issue.
Therefore expecting an exact solution of this problem.Kindly help.
Thanks and Regards
Anik Sarkar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anik,
Why you using Payload swap bean, Try without bean that should work
Regards
GB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi GB,
Do you mean to try without both Payload Swap Bean and Message Transform Bean?
I tried without using Payload Swap Bean and Message Transform Bean,in that case I am getting 2 attachment:
1st the file whose content is required only in the mail body is coming as one attachment with its name i.e; file.xml
and 2nd is the actual file which I want to come as an attachment is coming as untitled.xml
Here the attachment file.xml is the file whose content I want to come only in the body and not as attachment and untitled.xml is the file which I want to come as attachment but here the name of the file i.e; file_test is not populating.
Thanks and Regards
Anik
Hi Anik,
Can you try below module configuration in your mail adapter and test?
This will swap the payload of file_test content to the MainDocument. Check this links for reference http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5...
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anik,
Just give a try my module configuration. By default, mail adapter attach the payload (MainDocument) of the message to the mail. you can swap the payload content of your attachment (file_test.xml) to MainDocument, then you will receive file_test.xml payload in attachment of your mail.
Regards,
Praveen
Hi Praveen,
I tried what you have suggested.I am getting 2 attachment:1st the file whose content is required only in the mail body is coming as one attachment with its name i.e; file.xml
and 2nd is the actual file which I want to come as an attachment but it is coming as untitled.xml.The same output what I get trying Gagandeep suggestion.
Hi Anik,
For me only one file (untitled.xml) is attaching with content of file_test.xml.
Did you you activated the channel? Because i tested with below configuration, it's attaching only one file untilted.xml (i'll check why filename wrongly created and provide solution) in mail.
file.xml:
file_test.xml:
Sender CC:
Receiver CC:
Mail with attachment:
Regards,
Praveen
Hi Praveen,
Are you doing anything in ESR Mapping in the mail package structure?
I have done the following mapping:
emailid-->From
emailid-->To
application/xml----->Content_Type
filename----->Content_Description
inline;filename="filename"----->Content_Disposition.
Is this required in ESR?If possible can you also share the screenshot if you have done anything in ESR?
Thanks and Regards
Annik
User | Count |
---|---|
94 | |
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.