Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

JAX-RS service with DELETE method returns 405 (Method not allowed)

$
0
0
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?

Viewing all articles
Browse latest Browse all 5648

Trending Articles