For schema:

 

  <xs:complexType name="Invoice_Type">

    <xs:all>

      <xs:element name="InvoiceNum" type="INV_NO_Type" minOccurs="0"/>

      <xs:element name="InvoiceClass" type="INV_CLASS_Type"/>

      <xs:element name="Warehouse" type="WARE_NO_Type"/>

    </xs:all>

  </xs:complexType>

 

Where INV_NO_Type is defined as an Integer, I get the following error if I leave out the <InvoiceNum/> tag from the XML.

 

java.lang.Exception: Xml NOT valid for the following reason(s):

            error: Expected element InvoiceNum at the end of the content in element Invoice

 

 

However, if I replace <xs:all/> with <xs:sequence/> it seems to work without any problem. Any clues anyone?

 

Regards,
Sanjeev

 

 

Reply via email to