I'm having trouble trying to implement the code examples from Blaise's JAXB and Inheritance blog. The element "Path" is getting lost in translation somewhere: I'm setting it then it returns as null. I'm using xjc to translate the code below to java, creating and populating the object, sending it to the java message bus, then consuming the message. However, everything else is set as expected. Here's my version thus far:
<xs:schema ...>
<xs:complexType name="vehicle" abstract="true">
<xs:annotation>
<xs:appinfo>
<jaxb:class ref="other.extensions.vehicle" />
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<element name="Path" type="xs:string" minOccurs="0"/> <!-- Problem Child -->
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyVehicle" abstract="true">
<xs:complexContent>
<xs:extension base="vehicle" >
<xs:sequence>
<element name="Operator" type="xs:string" minOccurs="0" maxOccurs="0" />
<xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="car">
<xs:complexType>
<xs:complexContent>
<xs:extension base="MyVehicle" >
<xs:sequence>
<element name="Path" type="xs:string" minOccurs="0"/>
<element name="Operator" type="xs:string" minOccurs="0"/>
<element name="Model" type="xs:string" minOccurs="0"/>
<element name="DriveTrain" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>