cancel
Showing results for 
Search instead for 
Did you mean: 

How to use File Adapter Receiver to write attachments

Former Member
0 Kudos

Hi,

i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments

On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.

The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.

I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.

Could anyone give me any ideas?

thanks a lot in advance

Xiang

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Experts,

Even i have a similar requirement to pick two files from the source directory(SFTP folder location) Userconsolidated.csv and another is Groupconsolidated.csv. Userconsolidated,csv would need mapping transformation and no transformation for Groupconsolidated.csv.

Both the files to be placed at the same place in target folder which is NFS. Is there any way we can write both the files.

Thanks

Varun

vicky20691
Active Contributor
0 Kudos

Hi ,

Please follow the below blog. Here we are picking 2 files on in the payload and one in the attachment. Even rajashekhar question fna goes to payload and pdf as attachment.

Regards,

Vikas

Former Member
0 Kudos

Hi Vikas,

Thanks for you reply. my requirement is to pick two files(fna and pdf with same names) by using NFS sender channel and has to write both of them by using NFS receiver channel(no merging). Here no mapping is being used. Its a pass through interface. I got to know that NFS receiver doesn't have "store attachments" option. So kindly explain me how to configure NFS receiver to write both files.

Thanks,

Rajashekar.

vicky20691
Active Contributor
0 Kudos

Hi,

Receiver file adapter doesn't support attachments. I read the suggestion of stefan, that is the way to do it.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/404ee507-3fbc-2e10-00bc-be90ab28d...

follow the above document

Regards,

Vikas

Former Member
0 Kudos

hi,

receiver file adapters do not supprt attachments.

Only File Sender adapter is capable of handling attachments not the receiver.

http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm

Configuring the sender FILE adapter

The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File

access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured

under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.

Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the

MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format

and also change the file extension.

The PayloadSwapBean module is used to replace the application payload of the XI message that holds the

data with another payload which is appended to the message as an attachment. In our case, the payload

would be file1.xml whereas the attachment would be file1.jpg

The swap module is denoted in our scenario with the module key ‘swap’. It has two parameters from the

MIME header.

regards,

pradeep.

Former Member
0 Kudos

Hi pradeep,

thanks a lot for your reply. But I must write the PDF attachments into the directroy. Is there any work round?

regards

Xiang

stefan_grube
Active Contributor
0 Kudos

You can use the Axis adapter in file mode:

http://help.sap.com/saphelp_nw04/helpdata/en/45/a3c48c87cd0039e10000000a11466f/frameset.htm

This supports attachments.

Another option is using two receiver for the message, one writes the file, the other one the attachment.

Regards

Stefan

Former Member
0 Kudos

Hi Pradeep,


I also have same requriement. Need to send ".fna" file with ".pdf" as an attachment. File to Fie Scenario. How to configure in receiver channel.

I must write the PDF attachments into the directroy. Is there any work round?


Thanks,

Rajashekar.