Hi Sergey,
Thanks you were correct. It is not the HTTP method that is causing the
issue. I looked again and I find its a mismatch on the @Produces and the
Accept header of the request. The resource has:
@Produces("application/json")
Whereas the request has header Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Using curl I changed the Accept header to Accept:
application/json,text/html,application/xhtml+xml,application/xml;q=0.9,*/*;
q=0.8
And it started working again.
So I think in CXF 2.2.12 the Accept header from the request was not being
used in the matching algorithm and now it is.
Is there any configuration I can apply to tell CXF to ignore matching on
the Accept header?
Thanks
Duncan
On 17/10/2014 13:53, "Sergey Beryozkin" <[email protected]> wrote:
>Hi
>On 17/10/14 13:40, Duncan Keysell (dkeysell) wrote:
>> Hi,
>> I'm migrating CXF version used in my application from 2.2.12 to later
>>version. I've found that one set of clients of the REST resources has
>>been using POST requests to a resource that has @DELETE annotation and
>>this was working in 2.2.12 but isn't when I migrate to later version.
>>
>That must've been a pretty bad error, if a POST request was matched to
>DELETE methods; CXF 2.2.12 is probably JAX-RS 0.8, right ? That said it
>is strange it ever worked...
>> Is there some configuration I can apply that will tell the CXF
>>selection algorithm to ignore the HTTP Method type?
>>
>No, not really, you can change HTTP verb though, most portable way is to
>use a @PreMatch-annotated ContainerRequestFilter
>
>Cheers, Sergey
>> Thanks
>> Duncan
>>
>