Skip to Content
0

Unzip file to file scenario using PayloadZipbean

May 16, 2017 at 08:10 PM

290

avatar image

Hello Everyone,

I have a very simple File to File scenario (without message mapping).

We will get zip file from a partner, this zip file will contain about 40 txt files.

PO needs to pick the zip file and drop to a NFS location after unzipping them. To handle this, i have configured PayloadZipBean in the Sender File Adapter.

The Sender CC works fine. it unzip the file but in receiver CC it is showing error. I have not done any module config in receiver channel. Do I need to config here also. What am i missing in Reciever CC.

Thanks

Virendra Singh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Apu Das May 17, 2017 at 04:45 AM
0

Hi Virendra,

As it is pass through scenario, try to use payloadZipBean = zipAll in the receiver end and see what happens.

Thanks,

Apu

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Apu

I tried zipAll in reciever. Its not working. Please suggest any other solution. Currently only one file is placing in Al11 and the name of the file is not same and after unzipping and its a random file out of 40 files. Can you please suggest how to handle multiple files and place it in one folder with the same name of files as in zip file.

Thanks

Virendra Singh

0
Evgeniy Kolmakov May 17, 2017 at 07:31 AM
0

Hi Virendra!

First, zipAll is used for zipping both the main payload and attachments, not for unzipping.

Second, file adapter doesn't support attachments, so if you even unzip all of your zipped content you won't be able to save it to file system.

If you want to save all of your zipped files, you should either use SFTP adapter at receiver's side, since it handles attachents, or develop a custom adapter module, for example, which will extract zipped contents and create separate message for each file.

Another option is to use OS command after message processing in receiver file adapter. There you can use OS script to unzip your file after putting it to destination folder.

Regards, Evgeniy.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy

Thanks for you reply. The file adapter is not supporting the attachments. How to handle the attachment using SFTP. The zip file contain 40 files and i need to place those 40 files in one folder in AL11. The file name should be same as in the zip file. Currently by using file to file, only one file is placing in Al11 and the name of the file is not same and after unzipping and its a random file out of 40 files. Can you please suggest how to handle multiple files and place it in one folder with the same name of files as in zip file.

Thanks

Virendra Singh

0

Hi Virendra!

I'd suggest using OS script after message processing because handling 40 attachments in message is not the good practice comparing against performance. Just put your zip file to destination folder and use OS script to unzip it.

Regards, Evgeniy.

0