users@jax-rs-spec.java.net

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

From: Sergey Beryozkin <sberyozkin_at_talend.com>
Date: Tue, 1 May 2012 21:49:45 +0100

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

Sergey