users@jersey.java.net

[Jersey] Newbie how to return an XML representation of a class with an arraylist

From: <rajeshkhan808_at_gmail.com>
Date: Sat, 7 Apr 2012 09:55:44 +0000 (GMT)

Hi I wanted to know how i could return a class as XML which has an
arraylist in it
Example

@XmlRootElement
class someclass
{
 private ArrayList<AnotherClass> ac;
     public someclass()
     {
         ac = new ArrayList<AnotherClass>();
     }
}

Also how would i send an arraylist<AnotherClass> back in XML form any
suggestions would be appreciated.