I'm reading a file from File Component, example file name as TestCustomer.xml
. I need to compress the file ( ZIP format) and place it on file component with the name TestCustomer.zip
. While extracting the file only, it should reflects as TestCustomer.xml
externally.
I have tried in multiple ways, but it is not working as expected outbound folder outputPattern
.
- File pattern as 'TestCustomer.xml.zip' - Response as 'TestCustomer.xml.zip' ( But expected should be TestCustomer.zip)
- Tried as 'TestCustomer.zip' - Response as 'TestCustomer.zip' ( But when I extract it, it is in file format not in xml format).
Tried as TestCustomer.xml - Response as TestCustomer.xml ( not able to extract the file since it is not in proper format).
<flow name="testzipFlow1" doc:name="testzipFlow1"> <file:inbound-endpoint path="c:/in" connector-ref="File" responseTimeout="10000" doc:name="File"/> <logger level="INFO" doc:name="Logger"/> <gzip-compress-transformer></gzip-compress-transformer> <file:outbound-endpoint outputPattern="TestCustomer.xml.zip" responseTimeout="10000" doc:name="File" path="c:/output"> </file:outbound-endpoint> </flow>
Let me know if you have thoughts on this to achieve in desired fileName. Thanks in advance.