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

Discussion in 'XML' started by Stacey, Jan 20, 2004.

  1. Stacey

    Stacey Guest

    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
     
    Stacey, Jan 20, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam Hwang
    Replies:
    0
    Views:
    625
    Sam Hwang
    Apr 26, 2005
  2. Jacky Luk
    Replies:
    4
    Views:
    867
    Bhupendra
    Nov 23, 2005
  3. Replies:
    1
    Views:
    867
    Martin Honnen
    Jan 14, 2004
  4. Replies:
    8
    Views:
    540
  5. Replies:
    2
    Views:
    914
    F. Marker
    Feb 16, 2007
Loading...

Share This Page