We would like to decompress a byte array using Spring Integration and are experiencing the following exception upon using unzip-transformer:
org.springframework.integration.handler.ReplyRequiredException: No reply produced by handler 'org.springframework.integration.handler.MessageHandlerChain#1$child#1' ., and its 'requiresReply' property is set to true.,failedMessage=GenericMessage [payload=byte[327] ...
This is the .xml blob we are trying to use for this effort:
int-zip:unzip-transformer result-type="BYTE_ARRAY" expect-single-result="true"/>
The equivalent java code using service-activator works fine for decompression:
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
GZIPInputStream gzipInputStream;
gzipInputStream = new GZIPInputStream(new ByteArrayInputStream((byte[])
message.getPayload()));
IOUtils.copy(gzipInputStream, byteArrayOutputStream);
byteArrayOutputStream.close();
return new String(byteArrayOutputStream.toByteArray(), Charsets.UTF_8);
Is there any way to do the same code using unzip-transformer?