No one answered, so I'll answer it myself. The problem is that WSDL2java ignores the 'minOccurs' and 'maxOccurs' when used in Schema element '<xs:sequence>'. It is however handled properly when thise attributes are used in '<xs:element>'. SO, everything works fine if you redefine the Schema to:
<xs:element name="Batch"> <xs:complexType> <xs:sequence><xs:element ref="bProperty" minOccurs="0" maxOccurs="unbounded"/></xs:sequence> </xs:complexType> </xs:element> BR Silvester ----- Original Message ----- From: "SilvesteŽ PozaŽnik" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 07, 2003 4:06 PM Subject: WSDL2Java and minOccurs/maxOccurs sequence problem > I have a problem when generating java class that should hold an "unbounded" > number of subelements when using WSDL2java stub generator. The Schema (see > under) describes the <Batch> element containing unbounded sequence of > <bProperty> elements, while (as far I can see) the generated java class > Batch is not capable of holding more then a single BProperty. The problem > occures if more then one <bPropertty> are transmited in a single <Batch> > element. Am I missing something here? > > > Schema: > ====== > ... > <xs:element name="Batch"> > <xs:complexType> > <xs:sequence minOccurs="0" maxOccurs="unbounded"><xs:element > ref="bProperty"/></xs:sequence> > </xs:complexType> > </xs:element> > ... > <xs:element name="bProperty">... > ... > > > Generated java: > ========== > [from Batch.java] > > ... > public class Batch implements java.io.Serializable { > private TTSearch.BProperty bProperty; > ... > > [form BProperty.java] > ... > public class BProperty implements java.io.Serializable, > org.apache.axis.encoding.SimpleType { > ... > > > BR > Silvester >