I would really appreciate some help on this, i'm sort of up against it. any help would be "greatly" appreciated...
 
I have a fairly complex schema that i'm generating java for.  I have flexibility to change the schema, write binding files, or whatever.  I guess i'm having a problem understanding how to get the source generator to do what i think is fairly straightforward.
 
I have reproduced this as simply as possible:
 
The schema/object model contains the following:
 
VehicleTitle (top level element), contains an Owner, Registrant, and a Lien.  The Lien contains a LienID and a Lienholder.  Owner, Registrant, and Lienholder are all the same type (Party).
 
So what i'm hoping to get is (more or less) are classes representing VehicleTitle, Party, Lien.  With getter/setters for Owner/Registrant/Lienholder of type Party. It would seem to me that what i' m asking for are classes for only the top level elements or complex types. 
 
However i get classes for Lienholder, Registrant, Owner (all derived from PartyType).  This is problematic.  In my realworld schema I have the Party Object used in many many places and can't afford to have classes generated for every element that references it.
 
Is there a way to acheive my objective?  Different approach to the schema? If i need entries in the binding file (i've tried a few), please please somebody provide me with the simple example as it is not clear (to me anyway) how to achieve it there. 
 
 
The schema is below.  I have a single top level element, and everything else is a ComplexType that can be used througout.
 
Is this the preferred/advisable way to define the schema to acheive the above objective? 
 
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bulk="urn:trivininc.com/bulk" targetNamespace="urn:trivininc.com/bulk" elementFormDefault="qualified" attributeFormDefault="unqualified">
 <xsd:element name="VehicleTitle">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="Owner" type="bulk:Party"/>
    <xsd:element name="Registrant" type="bulk:Party"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
 <xsd:complexType name="Lien">
  <xsd:all>
   <xsd:element name="LienID" type="xsd:string"/>
   <xsd:element name="Lienholder" type="bulk:Party"/>
  </xsd:all>
 </xsd:complexType>
 <xsd:complexType name="Party">
  <xsd:all>
   <xsd:element name="LastName" type="xsd:string"/>
   <xsd:element name="FirstName" type="xsd:string"/>
  </xsd:all>
 </xsd:complexType>
</xsd:schema>
----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to