I am using json webservice using Spring3.0 restTemplate by calling the post method.
MultiValueMap<String, String> headers = new LinkedMultiValueMap<String, String>(); headers.add("Content-Type", MediaType.APPLICATION_JSON_VALUE); HttpEntity<Object> entity = new HttpEntity<Object>(requestAsString, headers); postForObject = restTemplate.postForObject(url, entity, responseClass );
Our application is deployed on a WAS server and tries to connect to the manufacturer by creating a connection with TLS1.0. However, now the manufacturer only supports TLS1.1 and TLS1.2.
How to force use restTempate to use TLS1.1 or TLS 1.2.
Usually for apache httpclient code, create your own protocol ProtocolSocketFactory and override the createSocket method. However, in the case of RestTemplate, how to achieve the same.
source share