users@jersey.java.net

[Jersey] Re: Generics coleections in return type

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Thu, 17 Mar 2011 15:18:51 +0100

I investigated around this a little too, but there doesn't seem to be
easy solution..

.. problem is in AbstractListElementProvider, in the way how it obtains
type arguments. I guess we would need to have another implementation of
AbstractJAXBProvider to provide this functionality.

can you please file new issue, so we won't forget about this?

Thanks,
Pavel

On 03/17/2011 12:51 AM, Martin Matula wrote:
> Hi,
> Currently this is not supported. Let me see if I can fix it.
> Martin
>
> On Mar 15, 2011, at 8:43 PM, Shalom Kazaz wrote:
>
>> Hi
>> I have a resource method that needs to return
>> List<JAXBElement<Message>>
>>
>> but jersey doesn't support it by default:
>> A message body writer for Java class java.util.ArrayList, and Java type
>> java.util.List<javax.xml.bind.JAXBElement<com.my.Message>>, and MIME media type
>> application/json was not found
>>
>>
>> what is the way to marshall this return type?
>>
>