Hi, I am trying to call a remote http service to retrieve a message using http4 component.
I would like to understand the sentence from the http4 component web page http://camel.apache.org/http4.html "Camel will store the HTTP response from the external server on the OUT body. All headers from the IN message will be copied to the OUT message, so headers are preserved during routing. Additionally Camel will add the HTTP response headers as well to the OUT message headers." But exchange.getOut() is null after a http4 call and the result seems to be present in the exchange.getInt() body... to("http4://myURI").// process(new Processor() { @Override public void process(Exchange exchange) throws Exception { log.info(exchange.getOut().getBody().toString()); ==> NPE } }) And last, how do I can read the body and convert it into a String ? The body seems to be an instance of CachedOutputStream. How should I read this ? I looked to convertBodyTo camel method but can't find any elegant solution to transform my CachedOutputStream into a String. Regards, Cyril Lakech -- Ce message et toutes les pièces jointes sont établis à l'attention exclusive de leurs destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. L'internet ne permettant pas d'assurer l'intégrité de ce message, le contenu de ce message ne représente en aucun cas un engagement de la part de GROUPE ADEO.