from("direct:npGet")
                .setHeader(Exchange.HTTP_METHOD, constant("GET"))
                .setProperty("url", simple("${body}"))
                .recipientList(simple("${body}?" + npAuthenticationString))
                .convertBodyTo(Document.class)
                .bean(HelperBean.class, "setUrlETagMapping")
                .process(new ObjectCreationProcess(xmlToObjectMapping));



stopWatch.start();
Exchange ex = producerTemplate.request("direct:npGet", new
StringBodyProcessor(resourceURI.toString())); 
stopWatch.stop();


The StringBodyProcessor is simply to set the url in the exchange body.
The ObjectCreationgProcess is simply to create a new Object of the
downloaded xml.

My producer template is in a recursive loop.

and my resourceURI is looks like : http://mysite.com/users/{id}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-HTTP-component-vs-Apache-HTTP-client-tp5735943p5735954.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to