On Tue, Mar 31, 2009 at 11:24 AM, Farrukh Najmi
<farrukh_at_wellfleetsoftware.com> wrote:
> Farrukh Najmi wrote:
>>
>> Farrukh Najmi wrote:
>>>
>>> Marc Hadley wrote:
>>>>
>>>> I think if you inject an instance of Providers then you should be able
>>>> to use the getMessageBodyReader method to get a reader that will unmarshall
>>>> your JSON string.
>>>>
>>>
>>> Thanks Marc. Can you tell me how to "inject an instance of Providers". I
>>> have a JAXBContextResolver class that implements
>>> ContextResolver<JAXBContext>. I do not know though how I can get an instance
>>> of that class injected in my class.
>>>
>> OK. I RTFMed of the jsr 311 spec.
>>
>> I can get Providers injected via @Context annotation within my class.
>> Thanks.
>>
> Hi Marc,
>
> I am unclear from javadoc of getMessageBodyWriter what I should use for type
> and genericType params.
> I need to unmarshal the JSON String into List<PostalAddressType>.
Not sure if this helps, but I'm pretty sure you must define
genericType, because you have generics signature. Type shouldn't be
used if so.
-+ Tatu +-