Hi Sneha
My article that you referred to is about unzipping the main payload into multiple attachments (of the same message.)
Your scenario is a bit different and requires a combination of techniques to work.
1) Getting the zip file attachment as the main payload
You need to check if the zip file is coming as an attachment or as the main payload. Just try setting up a scenario without any mapping/modules and see how it looks like in the logs. If it is an attachment, then you need to use the PayloadSwapBean to swap it to the main payload. You can refer to the solution in the thread below for the parameters for the swap
Mail Sender adapter issue in PO7.4
2) Unzip the main payload (with zip content from above swap)
For this step, you can refer to my article on the logic to unzip using ZipInputStream/ZipEntry
3) Create multiple IDocs
My article creates attachments instead of multiple child messages. So, you need to adapt the logic to create multi child messages instead for each file in the zip file. You can achieve this via multi-mapping within the Java mapping. Refer to the wiki below for that.
Multi-Mapping using Java Mapping - Process Integration - SCN Wiki
Alternatively, if you don't want to complete this in one complex scenario, you can break it down into a few scenarios.
- The first scenario gets the zip attachment, swaps it, unzip it into multiple attachment and saves all the attachment in a temporary file location
- Second scenario picks up those files individually and maps it to IDoc and post to ECC
Rgds
Eng Swee