You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Guy Pardon <gu...@mac.com> on 2012/01/21 18:03:33 UTC
MIME Types for empty body
Hi cxf,
- can/should empty requests have a @Consumes annotation?
- can/should empty responses have a @Produces annotation?
Thanks!
Guy
Sent from my iPhone
Re: MIME Types for empty body
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Guy,
On 21/01/12 17:03, Guy Pardon wrote:
> Hi cxf,
>
> - can/should empty requests have a @Consumes annotation?
Only needed if a single method is meant to handle empty and no-empty
payloads, otherwise it is not needed.
If it is the case then one possible issue is that JAX-RS 1.1 requires
400 be returned when JAXB is involved and the payload is empty.
>
> - can/should empty responses have a @Produces annotation?
Same as with @Consumes, only if the single method can return either
empty or non-empty payloads. CXF has been fixed to return no
Contnet-Type at all in the former case...
Cheers, Sergey
>
> Thanks!
> Guy
>
> Sent from my iPhone