Skip to Content
avatar image
Former Member

Unzip file to file scenario using PayloadZipbean

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 17, 2017 at 04:45 AM

    Hi Virendra,

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

    Thanks,

    Apu

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • May 17, 2017 at 07:31 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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.