title: Jaxb complex xml unmarshall
body: <p>I am having issues to unmarshall nested xml below. Can someone please advise if I am missing something.<br>
  <code>body</code> tag can contain any Jaxb anotated obj.<br>
  Do I have to create a custom adapter for marshalling/unmarshalling such xml?</p>
  
  <p><strong>Input XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;serviceRq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="serviceRq"&gt;
    &lt;body&gt;   
      &lt;createRq&gt;
         &lt;id&gt;1234&lt;/id&gt;
      &lt;/createRq&gt;
    &lt;/body&gt;
  &lt;/serviceRq&gt;
  </code></pre>
  
  <p>My Jaxb-annotated classes are:</p>
  
  <pre><code>@XmlRootElement
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "serviceRq")
  public class ServiceRq{    
      private Object body;
      &lt;!-- getters and setters omitted--&gt;
  }
  </code></pre>
  
  <p>Here, body can be any jaxb annotated object, in this case its CreateRq.</p>
  
  <pre><code>@XmlRootElement
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "createRq")
  public class CreateRq{    
      private String id;
      &lt;!-- getters and setters omitted--&gt;
  }
  </code></pre>
  
  <p>I am looking for a generic way to support any Jaxb annotated object in body of the input xml.</p>