Hi

Please see

https://jsr311.dev.java.net/nonav/releases/1.0/javax/ws/rs/ext/MessageBodyReader.html#isReadable(java.lang.Class,%20java.lang.reflect.Type,%20java.lang.annotation.Annotation[],%20javax.ws.rs.core.MediaType)

some more comments inline

cheers, Sergey

On Mon, Mar 1, 2010 at 8:20 PM, DmitryM <[email protected]> wrote:

>
> Sergey,
>
>
> Sergey Beryozkin-5 wrote:
> >
> > please see comments inline
> >
>
> Thanks for the comments.
> Looks like I'm getting closer.
> But I still have a question.
> Can you please comment on the parameters value for the
> JSONProvider.readFrom
> method
> (on those except for the apparent first and last one):
>
> public java.lang.Object readFrom(java.lang.Class<java.lang.Object> type,
>                                 java.lang.reflect.Type genericType,
>                                 java.lang.annotation.Annotation[] anns,
>                                 javax.ws.rs.core.MediaType mt,
>
> javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers,
>                                 java.io.InputStream is) throws
> java.io.IOException
>
> > genericType - can be the same as the first parameter
> anns - annotations attached to a method parameter representing a
request/response body
> mt - media type of the request/response
> headers : request/response HTTP headers

when invoking JSONProvider directly you can probably only set a genericType
parameter, pass an empty annotations array, then MediaType.APPLICATION_JSON,
and null for headers. Benson was keen for providers like JSONProvider to be
parameterized by T but I did not get to fixing it



Thanks,
> Dmitry
> --
> View this message in context:
> http://old.nabble.com/Unmarshal-WebApplicationException-Response-JSON-entity-tp27726278p27748553.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to