Skip to Content
avatar image
Former Member

Unzipping files in receiver file adapter by payload zip bean

Hello Experts, we have a requirement in our File ----PI----File scenario where we are required to unzip the zip file in the target folder in Al11

.

The zip file on the source can contain multiple files in any format which are required to be unzipped at the Target. we are required to achieve this in PI apart from the OS command option.

I tried using Payload zip bean in the module tab in the receiver but it seems it is not working and sending the zip file as it is to the target. Screenshot attached.

Kindly suggest.

Regards,

Shubhamcapture.png

capture.png (9.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Apr 04, 2017 at 06:54 AM

    Hi Shubham!

    First, what kind of adapter is used at receiver side? If it's File adapter - it doesn't support working with attachments. You need SFTP adapter for your requirement.

    Second, what is your target file naming scheme? If you use ASMA parameters to set target file name from sender ASMA parameters, the situation is possible that at target location you get your first extracted file with the name of source zip file.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Nirmal!

      You just need to check "Store attachments" option in receiver SFTP channel parameters.

      If you want to restore original file names for attachments you should also provide additional parameter retain.attachment.name = true.

      Regards, Evgeniy.

  • Apr 03, 2017 at 01:51 PM

    Hi Shubham,

    The module configuration looks good, what error you are getting? if you cant see any error then try XPI_inspector trace or increase loggin level in ICO and check.

    You can also try unzipping one file if that works try with your actual scenario.

    Thanks,

    Nishant

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 04, 2017 at 05:41 AM

    HI Nishant ,

    Thanks for the above reply.

    I want to unzip the source .zip file in the target folder and with the same name as in the source .zip file.

    Request you to help me with the best approach for the same.

    Thanks!!

    Shubham

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 07, 2017 at 03:07 PM

    Hi Subham,

    Did you try checking adapter specific message attribute, File Name on sender channel and receiver channel?

    Thansk,

    Nishant

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 08, 2017 at 02:16 PM

    Hi Subham!

    Do you have constant file names inside your zip archives?

    If Yes - you could use DynamicConfigurationBean to set file name.

    And if you need to extract multiple files - you have to use SFTP adapter on receiver side.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded