users@jersey.java.net

Jersey Client JAXB Collection

From: Lawson, Stephen R. -ND <Stephen.R.Lawson.-ND_at_espn.com>
Date: Thu, 8 Jan 2009 13:35:59 -0500

I have my classes annotated with JAXB, and I am able to retrieve individual objects and have them unmarshalled using the Jersey client using the code below. However, I have not figured out how to retrieve a collection of objects using the Jersey client. Can someone provide code that I would use to unmarshal a collection into JAXB objects? Thank you.

Client c = Client.create();
ClientResponse response = c.resource(RESOURCE_URI + "/ids/1").accept("application/XML").get(ClientResponse.class);
Application app = response.getEntity(Application.class);