users@jaxb.java.net

Prevent class hierarchy being reflected in schema

From: Vladimir Blagojevic <dovlex_at_gmail.com>
Date: Tue, 21 Jul 2009 14:24:53 +0200

Hi,

How do I prevent up class hierarchy to be reflected in xml schema? Say
there is a Student class:

public class Student extends Person {

     @XmlAttribute
     String name;
     @XmlAttribute
     int age;
     ....

I would like to exclude Person class from being reflected in schema
(<xs:extension/>). I tried attaching XmlAccessorType(XmlAccessType.NONE)
as well as attaching XmlTransient to fields of Person class - no help!

How can I achieve this type of mapping without resorting to
@XmlJavaTypeAdapter trickery?

Best regards,
Vladimir