I'm a rookie in Apache Camel and have a ApiRest for consume, and the response it's with gzip, I try this and it not work.
from("timer:aTimer?fixedRate=true&period=200s")
.doTry()
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.to("http4://" + ReaderXmlVenta.URL_VENTA)
.marshal(xmlJsonFormat)
.process("camelProcessor")
.to(routeMongo)
.to("log:org.apache.camel.example?level=DEBUG")
.to("log:Ok:Se guardo un registro Venta fija")
.doCatch(IllegalArgumentException.class);
And the exception is
Caused by: [java.util.zip.ZipException - Not in GZIP format] java.util.zip.ZipException: Not in GZIP format
The headers:
- Content-type -> text/xml;charset=utf-8
- Content-encoding -> gzip