cancel
Showing results for 
Search instead for 
Did you mean: 

Requirement to transfer multiple files

Former Member
0 Kudos

Hello gurus,

I'm receiving multiple files with the SOAP adapter in the following format:

Now, I need to write these into a directory using File(NFS) receiver adapter. I know that receiver file adapter does not support attachments.

So, I was thinking of zipping all files and writing that single file as the request message. But I am not quite sure how I can achieve that. Use a Java mapping to zip files first and add it as an attachment to the message, and use PayloadSwapBean in receiver file adapter to use the attachement as main payload? Or what other path can I follow?

Regards,

Gökhan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

A dummy DT solved the problem.

Thanks for all the help.

prasannakrishna_mynam
Contributor
0 Kudos

Hi,

The PayLoadZipBean suites your scenario as it is used to zip and unzip group of files. Inorder to use this Module. You need to configure this at your receiver file communication channel.

The Cofiguration Steps :

Processing Sequnce:

 
Number          ModuleName                             ModuleType                     ModuleKey
 1               AF_Modules/PayloadZipBean         LocalEnterpriseBean                  1
 2              CallSapAdapter                              LocalEnterpriseBean                  2     

ModuleConfiguration:


ModuleKey             parameterName                ParameterValue
1                            zip.Mode                            zipAll
1                            zip.filenameKey                  contentType

The above configuration zip all your payloads into one file with the name specified as in payload. All The Best.

Regards,

Prasanna

MichalKrawczyk
Active Contributor
0 Kudos

hi,

the easiest way would probably be:

1. zip all files in java mapping

2. put the content in the request message (not in any attachment, etc.)

3. inside receiver file adapter specify filename with ZIP extension

that's all I guess

Regards,

Michal Krawczyk

Former Member
0 Kudos

Thank you for your inputs, I have two questions on your answers:

1. How do I need to define my data type / message type / interface for sending those files? Lets say I got all files zipped and binary data is sent to the OutputStream from the Java mapping, how will I pass that stream as it is to the file adapter without an XML transformation?

2. How does PayloadZipBean work? Lets say I have one request and multiple attachments, will it zip all of them and send them to the adapter or will it zip each seperately and pass them on seperately?

Regards,

Gökhan