cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: JAX-RS: Convert return value to JAXB-annotated element for transparent marshalling
Date Wed, 01 Feb 2012 21:34:30 GMT
On 01/02/12 21:17, ceineke wrote:
>
> ceineke wrote
>>
>> I wrote a simple implementation of a MessageBodyReader that is annotated
>> with @Provider (no @Consumes) and has javax.ws.rs.ext.Providers injected
>> into it using @Context. I call providers.getMessageBodyReader(...) in my
>> implementation of readFrom with the parameters passed to my method, but
>> getMessageBodyReader returns my implementation.
>>
>
> Durrr.... of course, when I query the providers I have to ask for the
> MessageBodyReader of the transfer object class, not the domain object class.
> Works! :D

Great...'Providers' is a very useful context indeed

Cheers, Sergey

>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/JAX-RS-Convert-return-value-to-JAXB-annotated-element-for-transparent-marshalling-tp5447971p5448836.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message