title: JAXB and Jersey - returning a list of objects extending an abstract class
body: <p>I'm creating a REST service and I want to return a List of objects. So I got something like this:</p>
  
  <pre><code>@GET    
  @Produces(MediaType.APPLICATION_XML)
  @Path("items/")
  @XmlElementWrapper(name = "items")
  public List&lt;AClass&gt; getItems() {            
  
      List&lt;AClass&gt; list = db.getItems();      
      return list;
  
  }
  </code></pre>
  
  <p>where db.getItems() returns a list of objects that are a type of subclasses of AClass. AClass is an abstract class. Objects have more fields added. But these additional fields are not generated in an XML. How can I have them in a result?</p>