I worked with a service provider for the last week and a half trying to determine why my Rest call to their Service kept returning an HTTP 500 Internal Server Error. I was successful in performing a POST to their service. The DELETE is completely identical in payload (a JSON array of String) and even the same URL but no matter what I tried I kept getting a 500 code.
I tried Jersey Client API and I was able to perform the delete successfully the first time.
Has anybody else had issues with sending a DELETE using RestTemplate in Spring 3.1? Specifically I needed to use the exchange method so that I could update the HTTP Headers and receive their JSON response which I let Spring convert to a POJO.
Code:ResponseEntity<MyResponse> res = restTemplate.exchange(uri, HttpMethod.DELETE, myHttpEntity, MyResponse.class);


Reply With Quote