Skip to Content
0

Unzipping files in receiver file adapter by payload zip bean

Apr 03, 2017 at 10:02 AM

582

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Evgeniy Kolmakov Apr 04, 2017 at 06:54 AM
1

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.

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

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

0

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
Nishant Chavan Apr 03, 2017 at 01:51 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Shubham Agarwal Apr 04, 2017 at 05:41 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Nishant Chavan Apr 07, 2017 at 03:07 PM
0

Hi Subham,

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

Thansk,

Nishant

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Apr 08, 2017 at 02:16 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded