How to create a java "extends"/"implements" clause with xsd file and castor?

S

Stacey

I hate to start the email with the "I'm new to this clause", but there
it is. I am understanding how the xsd files work and how the castor
SourceGenerator works. What I am not understanding is how the binding
of a complexType to another package in java works.

Basically I have in my .xsd file:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
..
..
..
<xs:element name="my-Operation">
<xs:annotation>
<xs:documentation>Root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:all>
<xs:element ref="my-Login" minOccurs="0"/>
<xs:element ref="my-Logoff" minOccurs="0"/>
</xs:all>
</xs:complexContent>
</xs:complexType>
</xs:element>

(I understand I am missing the binding stuff, but I feel as though
what I have attempted is completely wrong so I will save you all the
pain...)

What I would like to get is:
public class MyOperation implements com.myother.package.MyInterface,
java.io.Serializable
{
....
}

Heck, at this point, I would forget the interface and use another
class instead:
public class MyOperation extends com.myother.package.MyClass
implements java.io.Serializable
{
....
}


The extends/implements clauses are what I can not figure out how to
generate. I am also unsure of how the xs:schema tag would change for
binding. Please help, all comments/responses are generously
appreciated.
Thanks,
Stacey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top