prevent schemagen from adding the super-class to the schema?
Posted
by shay
on Stack Overflow
See other posts from Stack Overflow
or by shay
Published on 2010-03-15T21:02:21Z
Indexed on
2010/05/16
11:00 UTC
Read the original article
Hit count: 272
Hi,
how do i prevent schemagen from adding the super-class to the schema?
I have tried using XMLTransient
on the super-class, and on its fields but they still show up in the schema .
for example :
@XmlTransient
public class Asset {
@XmlTransient
public Long ID;
}
public class Movie extends Asset {
}
creates this schema :
<xs:complexType name="asset">
<xs:sequence>
<xs:element name="ID" type="xs:long" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="movie">
<xs:complexContent>
<xs:extension base="asset">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
the schema that i would like to see is :
<xs:complexType name="movie">
<xs:complexContent>
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
© Stack Overflow or respective owner