title: Not able to invoke an @DELETE web service in REST/JERSEY
body: <p>I am using Jersey Framework (JAX-RS implementation) for building RESTful Web Services.</p>
  
  <p>I'm not able to use the @DELETE REST method, since its throwing an exception when I try to invoke it.The following @DELETE method is used to delete an Employee:</p>
  
  <pre><code>@Path("/employees")
  public class EmpResource {
  
  @DELETE
  @Consumes(MediaType.APPLICATION_JSON)
  public Response deleteEmployee(JAXBElement&lt;String&gt; r) throws ClassNotFoundException, SQLException {
  
      String name = r.getValue();
      String response = DAOaccess.deleteEmp(name);
      return Response.noContent().build();    
  </code></pre>
  
  <p>}</p>
  
  <p>And I'm using the following block of code to invoke the service:</p>
  
  <pre><code>Client client = Client.create();
  WebResource webResource = client.resource("http://localhost:8080/RestApp/sample/employees");
  String input = "{\"name\":\"John\"}";
  ClientResponse response = webResource.type(MediaType.APPLICATION_JSON).delete(ClientResponse.class,input);
  </code></pre>
  
  <p>When I run my client, it throws the following exception:</p>
  
  <pre><code>Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: java.net.ProtocolException: HTTP method DELETE doesn't support output
  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
  at com.sun.jersey.api.client.Client.handle(Client.java:648)
  at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
  at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
  at com.sun.jersey.api.client.WebResource$Builder.delete(WebResource.java:599)
  </code></pre>
  
  <p>It would be great if someone could guide me on how to resolve it?</p>