[
https://issues.apache.org/jira/browse/CXF-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892313#action_12892313
]
Donal Fellows commented on CXF-2903:
------------------------------------
I've attached a section of the log file from the webapp, logged at level FINE.
It's... noisy, but the relevant lines are probably these two (the second split
only for clarity):
{code:title=Log section}26-Jul-2010 14:47:07
org.apache.cxf.jaxrs.utils.JAXRSUtils logNoMatchMessage
FINE: No method match, method name : setStatus, request path : /status,
method @Path : /status, HTTP Method : PUT, method HTTP Method : PUT,
ContentType : text/html, method @Consumes : text/plain,, Accept : */*,,
method @Produces : text/plain,.{code}
While the failure to match is correct, it seems to be just forgetting that it
saw it. (I know the client shouldn't be producing text/html here. It's just a
hacked-around script to expose this issue.)
> Unexpected HTTP response code for @Consumes mismatch
> ----------------------------------------------------
>
> Key: CXF-2903
> URL: https://issues.apache.org/jira/browse/CXF-2903
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.9
> Reporter: Donal Fellows
> Attachments: taverna.log
>
>
> I have an interface with a method annotated as accepting XML (with
> {...@consumes("application/xml")}} and {...@post}}) and a class that
> implements that interface; the {...@path}} is not matched for {...@post}} by
> any other method. When I call it and pass in content with that MIME type, it
> all works. When I pass in content of another MIME type, I get a 404 response;
> this is unexpected, as I'd expect a 406 (Not Acceptable) response that tells
> me to pass in XML (to be clear, this _is_ an error case). Having to work
> around this by accepting all types and doing my own content type negotiation
> is unacceptable, especially since that decreases the utility of the generated
> WADL file significantly. Surely CXF should be doing this sort of work for me?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.