cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: MIME Types for empty body
Date Mon, 23 Jan 2012 10:12:54 GMT
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

View raw message