Hi,

I'm probably making some sort of a rookie mistake, but I could use
help figure out where I'm going wrong.

I'm getting this exception:

Caused by: ValidationException: The field '_initialDepositDate' (whose
xml name is 'initialDepositDate') is a required field of class
'com.csatp.model.castor.auto.Info;
   - location of error: XPATH: /info

In the schema from which Info class was generated, initialDepositeDate
has minOccurs attribute set to 0:

        <xs:complexType name="infoType">
                <xs:all>
                        <!-- Policy general information -->
                        <xs:element name="policyNumber" type="xs:string"/>
                        <xs:element name="policySuffix" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="policyRevision" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="applicationDate" type="xs:date" 
minOccurs="0"/>
                        <xs:element name="initialDepositDate" type="xs:date" 
minOccurs="0"/>
                        <xs:element name="productCode" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="grossPremium" type="xs:decimal" 
minOccurs="0"/>
                        <xs:element name="departureDate" type="xs:date"/>
                        <xs:element name="returnDate" type="xs:date"/>
                        <xs:element name="tripCost" type="xs:decimal"/>
                        <xs:element name="numberInsured" type="xs:int"/>
                        <xs:element name="status" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="fulfillment" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="destination" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="supplier" type="xs:string" 
minOccurs="0"/>
                        <xs:element name="airline" type="xs:string" 
minOccurs="0"/>
                </xs:all>
        </xs:complexType>

So I'm not quite sure why the exception.  Any thoughts?  I'm using Castor 1.2.

Thanks
Dmitry

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to