cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Streit <mcs...@gmail.com>
Subject Re: JAX-RS service with DELETE method returns 405 (Method not allowed)
Date Wed, 31 Dec 2014 13:22:45 GMT
I'm not a Jetty user as we use Tomcat for most things but I wonder if this
applies. It appears it has to be enabled in the Jetty configuration.
Apparently PUT and DELETE require specific configuration in Jetty?

http://grepcode.com/file/repository.springsource.com/org.mortbay.jetty/com.springsource.org.mortbay.jetty/4.2.22/org/mortbay/jetty/servlet/webdefault.xml

There's mention in the above page of putAllowed and deleteAllowed in the
section on initParameters

HTH


On Tuesday, December 30, 2014, Richard Snowden <richard.t.snowden@gmail.com>
wrote:

> I created a JAX-RS web service using Apache CXF which works fine so far.
> Also deployment to Apache Karaf 3.0.x worked.
>
> Now I added a new method like this:
>
>     @Produces(MediaType.APPLICATION_JSON)
>     @Path("/orders/{orderId}")
>     @DELETE
>     public boolean deleteOrder(@PathParam("orderId") String orderId) {
>           ...
>     }
>
> Unfortunately I get an HTTP error 405 when calling this method, because
> Jetty does not allow PUT or DELETE.
>
> AFAIK Jetty was installed when I did:
> feature:install http
> feature:install cxf
>
> How can I configure this embedded Jetty to allow DELETE?
>


-- 
Regards,

Mark

Sent from Gmail Mobile on iPhone

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message