[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-user
Subject:    FW: Possible bug in minoccurs restriction validation
From:       "Ghoshdastidar, Rabi" <rabi.ghoshdastidar () citigroup ! com>
Date:       2006-05-25 14:34:19
Message-ID: E9B2971E7B5D144B95E3EE353FC5559302C417CD () EXNJMB62 ! nam ! nsroot ! net
[Download RAW message or body]

Folks, I was wondering whether you guys know it as a bug or I am doing something \
wrong. Let's say I have xsd.

<xsd:element name="InvestmentMovements">
  <xsd:complexType>
     <xsd:sequence>
        <xsd:element name="InvestmentMovement" minOccurs="0" maxOccurs="unbounded">
   	     <xsd:complexType>
               <xsd:sequence>
		  	  <xsd:element name="FundCode" type="xsd:string" minOccurs="1" maxOccurs="1"/>
			  <xsd:element name="NAVDate" type="xsd:date" minOccurs="1" maxOccurs="1"/>
			  <xsd:element name="Amount" type="xsd:decimal" minOccurs="1" maxOccurs="1"/>
			  <xsd:element name="GLNumber" type="xsd:string" minOccurs="1" maxOccurs="1"/>
			  <xsd:element name="AssetType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="UK" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="Approved" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="IncomeType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="CSG" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="Listed" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="GBP" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="Direction" type="xsd:string" minOccurs="0" maxOccurs="1"/>
			  <xsd:element name="YearEnd" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
               </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
     </xsd:sequence>
  </xsd:complexType>
</xsd:element>

Data file

<InvestmentMovements>
  <InvestmentMovement>
    <FundCode>AAE6</FundCode>
    <NAVDate>2005-11-18</NAVDate>
    <Amount>-279824871.43</Amount>
    <GLNumber>103301</GLNumber>
    <GBP>true</GBP>
    <Direction>Credit</Direction>
    <YearEnd>false</YearEnd>
  </InvestmentMovement>
</InvestmentMovements>

AssetType & IncomeType are xsd:String and both are defined as minOccurs=0. It throws \
exception if I don't have those 2 tags in the data file. UK is xsd:boolean and \
minOccurs=0, if I don't have that tag it works fine and defaults to "false". I am \
attaching Debug log from Tomcat.

Thanks for you help.
Rabi


["ZermattWebServiceDEBUG.log" (application/octet-stream)]

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic