I'm trying to use GZIP with Camel-restlet, this is how I GZIP the entity in
response before I send the response out.
*=================Processor====================*
public void process(Exchange exchange) throws Exception {
Message message =exchange.getIn();
*Representation representation = new EncodeRepresentation(Encoding.GZIP,
new StringRepresentation(message.getBody(String.class),
MediaType.TEXT_XML)); *
}
On the client side I'm facing issue retrieving and decoding the gzipped
entity. I tried several ways but failed. There's not much information on how
to do this. Appreciate if you could point me in the right direction.
*Client Side.. Retrieveing response from Exchange MEssage*
String stream =
resultEndpoint.getExchanges().get(0).getIn().getBody(String.class);
Representation representations = new DecodeRepresentation(new
StringRepresentation(stream));
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-Restlet-2-14-0-DecodeRepresentation-tp5759382.html
Sent from the Camel - Users mailing list archive at Nabble.com.