users@jaxb.java.net

complexType extend an external Java class

From: Eric C. <coureux.eric_at_free.fr>
Date: Wed, 30 Sep 2009 11:30:57 -0700 (PDT)

I would share my problem :

In my schema file I declare this :

----------------------------------------------------------------------------------
<xsd:schema ...
...
<xsd:complexType name="template-transportable">
        <xsd:sequence>
            <xsd:element name="title" type="xsd:string" />
            <xsd:element name="content" type="xsd:base64Binary"
xmime:expectedContentTypes="application/octet-stream" />
        </xsd:sequence>
</xsd:complexType>
...
</xsd:schema>
----------------------------------------------------------------------------------

When I generate the class TemplateTransportable.java all is ok; but now I
would like this last one inherits from an existing java class (which is not
generated by Jaxb).
For exemple I have a class com.test.Template somewhere, and I would like my
generated class TemplateTransportable extends com.test.Template.

I have seen when can declare something
----------------------------------------------------------------------------------
<xsd:schema ...
...
        <xsd:annotation>
            <xsd:appinfo>
              <jaxb:globalBindings>
                <xjc:superClass name="com.test.Template"/>
              </jaxb:globalBindings>
            </xsd:appinfo>
        </xsd:annotation>
</xsd:schema>
----------------------------------------------------------------------------------
But it's not good because all my compexType in the schema file will inherit
from this com.test.Template, it's not my goal, I would to apply on only one
of my complexType nodes.

Anyone has any idea to resolve my problem ?

Thanks a lot everybody

-- 
View this message in context: http://www.nabble.com/complexType-extend-an-external-Java-class-tp25686486p25686486.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.