We were using RestTemplate with xml configuration in Spring 3.0 and it was working perfectly fine.
I was able to finally get this working. Not sure whether it is optimal, as this the first solution which worked for me.
`
-1 xxx xxx `