users@jersey.java.net

Re: [Jersey] Unmarshalling list of Jaxb elements using jersey client

From: Erdinc Yilmazel <erdinc_at_yilmazel.com>
Date: Tue, 10 Mar 2009 16:50:16 +0000

Thank you Paul for your immediate response. Generic type resolved it.

Erdinc

On Tue, Mar 10, 2009 at 4:36 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> On Mar 10, 2009, at 5:24 PM, Erdinc Yilmazel wrote:
>
>> I have methods returning list of objects that are annotated with
>> @XmlRootElement
>>
>>  @XmlRootElement(name = "registryEntry")
>>  public class RegistryEntry {
>>     ...
>>  }
>>
>>  @GET
>>  @Produces({"application/xml", "application/json"})
>>  public ArrayList<RegistryEntry> getEntries(....) {
>>      ...
>>  }
>>
>> This works fine on the web service side, however I could not find a
>> way of getting list of RegistryEntry classes on the client side. I
>> know I can write a wrapper class and return it rather than an
>> ArrayList, and unmarshall it on the jersey client side, but I will
>> have to write many of these then.
>>
>> Any ideas for calling this service using jersey client?
>>
>
> See the following sample:
>
>  http://download.java.net/maven/2/com/sun/jersey/samples/jaxb/1.0.2/jaxb-1.0.2-project.zip
>
> Specifically the unit tests that use the client API.
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>