You just need set the exchange property for the encoding like this
But you may need to use the template send() method to send the request, and extract the response yourself.
Thanks for the reply but I failed to extract the response from a template send() method. I tried various methods like:
Exchange outExchg = template.send(endpoint, exchg);
but the outExchg does not contain any response data. I would be grateful if you could post an example.
Sorry njiang! It actually works. Thanks.