Joined: Aug 21, 2008
Posts: 2
posted Today 12:51 AM I am trying to call DELETE method for my REST web service which I created using enuncaite.

when I try to access get it's working fine .. but unable to access DELETE and POST methods..

please fine my service class below

@Path("add/{id}")
@GET
public Persona readPersona(@PathParam ("id") String personaId);

@Path("store")
@POST
public void storePersona(Persona persona);

@Path("delete/{id}")
@DELETE
public Persona deletePersona(@PathParam("id") String personaId);

on making some research I got a solution to add an handler .. of which code looks like

if(request.getMethod()!=null && request.getMethod().equalsIgnoreCase("GET")
&&request.getPath().contains("/delete"))
{
request.setMethod("DELETE");
}
My website has around 500 url's which I need to delvelop .. and it;s looks really odd for me to do if else condition for each url,

please help me to get better solution than this or please teach me how this is best way for REST web service