cancel
Showing results for 
Search instead for 
Did you mean: 

Unzipping files in receiver file adapter by payload zip bean

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member190293
Active Contributor

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.

former_member323679
Participant
0 Kudos

Hi Evgeniy,

I too had a similar requirement some time back. I got that it was not possible with receiver file adapter. But never knew it was possible with SFTP Adapter. how to execute the same in SFTP adapter.

Regards,

Nirmal

former_member190293
Active Contributor
0 Kudos

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.

0 Kudos

Hi Evgeniy,

Many thanks for providing the additional parameter detail for handling filename attachments.

I used this in my receiver SFTP adapter under Advanced tab and out of 4 attachments in my case, I see last three attachments have been created with correct names but the first attachment (main document) is still taking the filename value given in the receiver SFTP adapter filename field.

How can I make sure to create the main document with same filename as coming from the zip folder?

Thanks, Sai.

former_member190293
Active Contributor
0 Kudos

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.

NishantChavan
Participant
0 Kudos

Hi Subham,

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

Thansk,

Nishant

Former Member
0 Kudos

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

NishantChavan
Participant
0 Kudos

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