http:outbound-gateway - Resttemplate method
I am trying to invoke a rest service from SI using http:outbound-gateway. When I look at the source code of SI, I believe that it in turn using RestTemplate.exchange method in org.springframework.integration.http.HttpRequestEx ecutingMessageHandler class.
There is an issue with the 3rd party rest service. When I try to execute using resttemplate exchage method with http method "GET", it give an http page as response, instead of the xml response. However, if I use Resttemplate getForObject method, it worked properly and gave proper xml response. The same html response is getting returned if I use SI because it uses Resttemplate exchange method.
Is there any work around in SI? Can I somehow ask SI to use Resttemplate getForObbject method in http:outbound-gateway?
Or Is there any way to change the resttemplate method that is use in http:outbound-gateway?
Thanks.