user1493140
user1493140

Reputation: 6186

Mule unzip transformer for processing zip file contents

I need to unzip a zip file, so I am looking for unzip transformer similar to gzip-uncompress-transformer.

<sub-flow name="unzip" doc:name="unzip">
    <gzip-uncompress-transformer></gzip-uncompress-transformer>
    <logger level="INFO" message="Unzipped payload" doc:name="Logger" />
    <byte-array-to-string-transformer
        doc:name="Byte Array to String" />
    <logger message="Payload is #[payload]" level="INFO" doc:name="Logger" />
</sub-flow>

Does mule provide such kind of transformer out of the box, or do I need to write custom transformer?

Upvotes: 2

Views: 1880

Answers (1)

Chad Gorshing
Chad Gorshing

Reputation: 3118

I do not believe Mule has a zip transformer due to the number of files that can result from using it. Such as decompressing a single zip could result in X files (one input file results in many output files). Whereas a gzip transformer is always 1 to 1 (one input file results in one output file).

Upvotes: 2

Related Questions