title: JAXB-REST cannot get extended class object
body: <p>I am having class A and class B<br/>
  class B extends class A</p>
  
  <p>It will be like this </p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.NONE)
  @XmlRootElement(name="root")
  @Inheritance(strategy=InheritanceType.JOINED)
  @XmlSeeAlso(value={B.class})
  class A implements Serializable{
    @Column(name="name")
    @XmlAttribute(name="name")
    private String name;
  
      //more fields and getters and setters...
  
  }
  
  @XmlAccessorType(XmlAccessType.NONE)
  @XmlRootElement(name="root")
  class B extends A{
  
      @XmlElement(name="type")
      private String type;
  
      // Fields and getter setters...
  }
  </code></pre>
  
  <p>When I pass B class object in REST POST method I cannot get instance of B instead I only get instance of class A. How can I get B instance, Is there any more configuration to do this? <br/><br/>Since I have more class like B which all are extends class A, I need to persist respective Entity in DB. Please help me on this.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>my input would like this:</p>
  
  <pre><code>&lt;root name="Duster"&gt;
      &lt;type&gt;SUV&lt;type&gt;
  &lt;/root&gt;
  </code></pre>