users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Alternative request and response entity types

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 10 May 2012 10:19:05 -0400

On 5/1/12 4:49 PM, Sergey Beryozkin wrote:
> Hi
>
> One thing that is limiting with MBR and MBW interfaces is that they do
> not support the alternative entity streams/data types. It's always
> either InputStream or OutputStream.
>
> However, it is often the case that the in or out streams have already
> been wrapped into more efficient STAX readers or writers.
>
> Any ideas on how to support alternative types for MBRs and MBWs to
> process ? In CXF this is handled in the CXF specific way, but I wonder
> if we can have say
>
> Response.getEntityType()
> Request.getEntityType()
>
> which would return InputStream.class by default but may also return
> XMLStreamReader.class, etc
>

Not sure I agree with this usecase. How an InputStream/OutputStream is
processed is really up to the MBR/MBW and the corresponding mapping the
the resource method.

> Sergey

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com