title: How to ignore JAXB annotated properties in a parent class?
body: <p>We have a class with a JAXB annotation on one property. We then have several subclasses which annotate the rest of the important data. We have one subclass, however, where we want to ignore the parent class annotation so that it does not get marshalled. Here's some example code.</p>
  
  <p>Parent class:</p>
  
  <pre><code>@XmlType(name="Request")
  @XmlAccessorType(XmlAccessorType.NONE)
  public abstract class Request {
      @XmlElement(required=true)
      private UUID uuid;
  
      ... setter/getter
  }
  </code></pre>
  
  <p>Now for the subclass:</p>
  
  <pre><code>@Xsd(name="concreteRequest")
  @XmlRootElement("ConcreteRequest")
  @XmlType(name="ConcreteRequest")
  @XmlAccessorType(XmlAccessorType.FIELD)
  public class ConcreteClass {
      @XmlElement(required=true)
      private String data1;
      @XmlElement(required=true)
      private String data1;
  
      ... setters/getters ...
  }
  </code></pre>
  
  <p>When I masrhall an instance of ConcreteClass I get the following XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;ConcreteRequest&gt;
      &lt;uuid&gt;uuid&lt;/uuid&gt;
      &lt;data1&gt;data&lt;/data1&gt;
      &lt;data2&gt;data&lt;/data3&gt;
  &lt;/ConcreteRequest&gt;
  </code></pre>
  
  <p>Where I want XML like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;ConcreteRequest&gt;
      &lt;data1&gt;data&lt;/data1&gt;
      &lt;data2&gt;data&lt;/data3&gt;
  &lt;/ConcreteRequest&gt;
  </code></pre>
  
  <p>We have other implementations of Request, however that do require the UUID, this is just a special case. Is there a way to ignore the UUID field in my ConcreteRequest?</p>