users@jaxb.java.net

Re: Generated class not inheriting correctly when mixed="true"

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 21 Nov 2007 09:33:47 +0100

Hi.

> I have a complexType defined as follows:
>
> <complexType name="StringValueType" mixed="true">
> <complexContent>
> <extension base="tns:AbstractValueType">
> </extension>
> </complexContent>
> </complexType>
>
> It should generate a class that extends AbstractValueType but id does not.
>
> Is this a bug? If so should I file an issue? Is there a workaround? Is
> it an HJ3 bug or a JAXB RI bug?
>
> I am using HJ3 0.3-SNAPSHOT with JAXB 2.1.4 to generate code.

I'm getting types inherited correctly with the following schema:

        <xsd:complexType name="SType" mixed="true">
                <xsd:attribute name="name" type="xsd:string" use="optional"/>
        </xsd:complexType>

        <xsd:complexType name="StringSType" mixed="true">
                <xsd:complexContent>
                        <xsd:extension base="test:SType"/>
                </xsd:complexContent>
        </xsd:complexType>

JAXB 2.1.5, HJ 0.3-SNAPSHOT.

Post your tns:AbstractValueType, I'll check it as well.

Bye.
/lexi