users@jersey.java.net

[Jersey] Re: Jersey Client WebResource delete with request entity?

From: arul <arulman_at_yahoo.co.uk>
Date: Sat, 17 Sep 2011 04:47:29 -0700 (PDT)

hi-
 I am getting the below error when I call Delete method from jersey client
com.sun.jersey.api.client.ClientHandlerException:
java.net.ProtocolException: HTTP method DELETE doesn't support output

My WebService code
@DELETE @Path("delete")
        @Consumes(MediaType.APPLICATION_XML)
        public Response unSubscriberAssetRequest(SubscriberDetail subscr) {
                logger.info("Inside method unSubscribeAssetRequest
------------------------------->");
                System.out.println("Id --->"+subscr.getAssetIdentifier());
                System.out.println("Type--->"+subscr.getAssetIdentifierType());
                return Response.status(Response.Status.ACCEPTED).build();
        }



My Client code
ClientResponse response =
webResource.path("subscriberResource").path("subscriber").path("delete").accept(MediaType.APPLICATION_XML).entity(subscriberDetailXML).delete(ClientResponse.class);

 Would you please reply someone how to resolve the issue?
Thanks
Arul

--
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-Client-WebResource-delete-with-request-entity-tp4150141p6803742.html
Sent from the Jersey mailing list archive at Nabble.com.