You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Lorenz, Stefan" <St...@htw-aalen.de> on 2010/12/20 12:16:10 UTC

Setting charset when using receiveBody from ConsumerTemplate

Hi,

I want to use the ConsumerTemplate to get data from a Webservice.
But the query I send in the receiveBody method does not seems to be valid encoded,
even I am using URLEncoder.encode(sparqlQuery, "UTF-8").

I run the same query in a route with a timer

from("timer:foobar?period=10000")
        .setHeader(Exchange.HTTP_QUERY, constant("query=" + encodedurl))
        .to("http://localhost:2020/sparql").process(new Processor() {..

..

And there it worked.
What is the difference between those calls?

Thx & regeards
Stefan