I\'m currently having a really weird issue with calling one REST service from inside another one and I could really use a hand in working out what I\'m doing wrong.
Use RestTemplate.exchange mentioned below :
ResponseEntity response = RestTemplate.exchange(EndPointURL, HttpMethod.GET/POST/PUT/DELETE, HttpEntity/headers, URI-Variables)
The input paramater's are described below :
EndpointURL -- SOAP End point URL ,that the REST service has to consume.
HTTPMethod -- Method Type such as GET ,PUT ,POST ,DELETE etc.
HTTPEntity -- Soap requires for mandatory sender headers.Make sure that you set your header(s) name and value as key-Value pair in HTTP headers.
URI-Variables -- (Object... urivariables) such as String.class ,Integer.class
You should also put the connectTimeout , isSSLDisabled, responseCached in the constructor while generating request to restTemplate.