cancel
Showing results for 
Search instead for 
Did you mean: 

PayloadZip bean for multiple files

Former Member
0 Kudos

Dear All

I am doing a scenario where I have to pick up a zip file containing multiple files.The task is to unzip and place the files in the target directory. I am using AF_Modules/PayloadZipBean in the receiver channel

The requirement is that the unziped files should have the same name as the original files

eg ABC.zip file contains invoice1.txt, invoice2.txt, invoice3.txt

The output in the final directory should be

invoice1.txt, invoice2.txt, invoice3.txt

The poblems I am facing

1. When I use ASMA parameters and give "*" in the receiver Communication Channel I get the original "zipped" file as output: ABC.zip

2. If I remove ASMA parameters and give a permanent name I get one one file as output. File.txt

I even tried DynamicConfigurationbean and variable substitution but it is alo yiedling the original zipped file as output

How can I aceive the functionality I am looking for

Sourabh

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Have you seen this stefan's blog. I believe since you do unzip you don't set the content type and filename.

http://scn.sap.com/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the...

You might want to try the blog's note referring adapter module to set the filename you want.

former_member184720
Active Contributor
0 Kudos

Hi Sourabh - It's not possible with that module.

Possible options :

Executing the OS commands - Depending on your OS you can write a shell script/dos commands to unzip the file. You can even write a java code and call that code using a batch file

Java mapping :

Please refer to the below thread - more complex and leads to memory issues in case you have many files inside the zip file.

http://scn.sap.com/message/7289311#7289311

Regards,

Hareesh

Bhargavakrishna
Active Contributor
0 Kudos