Hi Kory,

I believe the OrdersItem is getting created because you have an
unbounded sequence as such:

  <xs:complexType>
     <xs:sequence maxOccurs="unbounded">
        <xs:element name="OrderEntryId" type="xs:string"
nillable="true"/>
     </xs:sequence>
  </xs:complexType>

To prevent the OrdersItem, try changing the complexType, so that the
element declaration
is unbounded, not the sequence...as such:

  <xs:complexType>
     <xs:sequence>
        <xs:element name="OrderEntryId" type="xs:string" nillable="true"
            maxOccurs="unbounded"/>
     </xs:sequence>
  </xs:complexType>

I hope that helps,

--Keith

"Lasker, Kory" wrote:
> 
> I am generating classes from an XSD that defines a construct like this:
> 
> <Orders>
>   <OrderEntryId>
>   <OrderEntryId>
>   ...
> </Orders>
> 
> When I run SourceGenerator on the attached XSD, it generates the Orders
> object but also makes OrderEntryId into a OrdersItem object that I must call
> setOrderEntryId(...) against.  How can I have Castor generate a java
> Collection of Strings instead?  Is this something that can be done on the
> XSD side or must I do it with Castor?
> 
> Thanks,
> 
> Kory
> 
>   ------------------------------------------------------------------------
> 
>    DuplicateStatus.xsdName: DuplicateStatus.xsd
>                       Type: XML Document (text/xml)

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to