Amila, I've reverted this change since it causes a build failure in the integration module (test case: org.tempuri.complex.ComplexDataTypesTest). Please fix the tests and reapply the patch.
Andreas On Thu, Jan 7, 2010 at 09:35, <ami...@apache.org> wrote: > Author: amilas > Date: Thu Jan 7 08:34:59 2010 > New Revision: 896798 > > URL: http://svn.apache.org/viewvc?rev=896798&view=rev > Log: > removing minOccurs = 0 to avoid confusion with .net generated code see issue > AXIS2-3300 > > Modified: > > webservices/axis2/trunk/java/modules/integration/test-resources/BaseDataTypes.wsdl > > webservices/axis2/trunk/java/modules/integration/test-resources/generics/generics.wsdl > > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java > > Modified: > webservices/axis2/trunk/java/modules/integration/test-resources/BaseDataTypes.wsdl > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/BaseDataTypes.wsdl?rev=896798&r1=896797&r2=896798&view=diff > ============================================================================== > --- > webservices/axis2/trunk/java/modules/integration/test-resources/BaseDataTypes.wsdl > (original) > +++ > webservices/axis2/trunk/java/modules/integration/test-resources/BaseDataTypes.wsdl > Thu Jan 7 08:34:59 2010 > @@ -25,308 +25,312 @@ > <xs:element name="retBool"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inBool" > type="xs:boolean"/> > + <xs:element name="inBool" type="xs:boolean"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retBoolResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:boolean"/> > + <xs:element name="return" type="xs:boolean"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retSByte"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inSByte" > nillable="true" type="xs:byte"/> > + <xs:element name="inSByte" nillable="true" > type="xs:byte"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retSByteResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:byte"/> > + <xs:element name="return" nillable="true" > type="xs:byte"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retByteArray"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inByteArray" > nillable="true" type="xs:base64Binary"/> > + <xs:element name="inByteArray" nillable="true" > type="xs:base64Binary"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retByteArrayResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:base64Binary"/> > + <xs:element name="return" nillable="true" > type="xs:base64Binary"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retDouble"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inDouble" > type="xs:double"/> > + <xs:element name="inDouble" type="xs:double"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retDoubleResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:double"/> > + <xs:element name="return" type="xs:double"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retFloat"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inFloat" > type="xs:float"/> > + <xs:element name="inFloat" type="xs:float"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retFloatResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:float"/> > + <xs:element name="return" type="xs:float"/> > </xs:sequence> > </xs:complexType> > </xs:element> > + > <xs:element name="retSingle"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inSingle" > type="xs:float"/> > + <xs:element name="inSingle" type="xs:float"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retSingleResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:float"/> > + <xs:element name="return" type="xs:float"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retChar"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inChar" > type="xs:int"/> > + <xs:element name="inChar" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retCharResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:int"/> > + <xs:element name="return" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retInt"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inInt" > type="xs:int"/> > + <xs:element name="inInt" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retIntResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:int"/> > + <xs:element name="return" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUShort"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inUShort" > type="xs:int"/> > + <xs:element name="inUShort" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUShortResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:int"/> > + <xs:element name="return" type="xs:int"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retObject"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inObject" > nillable="true" type="xs:anyType"/> > + <xs:element name="inObject" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retObjectResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:anyType"/> > + <xs:element name="return" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > + > <xs:element name="retGuid"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inGuid" > nillable="true" type="xs:string"/> > + <xs:element name="inGuid" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retGuidResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:string"/> > + <xs:element name="return" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retString"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inString" > nillable="true" type="xs:string"/> > + <xs:element name="inString" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retStringResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:string"/> > + <xs:element name="return" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUri"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inUri" > nillable="true" type="xs:string"/> > + <xs:element name="inUri" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUriResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:string"/> > + <xs:element name="return" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retDecimal"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inDecimal" > nillable="true" type="xs:decimal"/> > + <xs:element name="inDecimal" nillable="true" > type="xs:decimal"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retDecimalResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:decimal"/> > + <xs:element name="return" nillable="true" > type="xs:decimal"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retULong"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inULong" > nillable="true" type="xs:integer"/> > + <xs:element name="inULong" nillable="true" > type="xs:integer"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retULongResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:integer"/> > + <xs:element name="return" nillable="true" > type="xs:integer"/> > </xs:sequence> > </xs:complexType> > </xs:element> > + > <xs:element name="retDateTime"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inDateTime" > nillable="true" type="xs:dateTime"/> > + <xs:element name="inDateTime" nillable="true" > type="xs:dateTime"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retDateTimeResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:dateTime"/> > + <xs:element name="return" nillable="true" > type="xs:dateTime"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retTimeSpan"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inTimeSpan" > nillable="true" type="xs:anyType"/> > + <xs:element name="inTimeSpan" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retTimeSpanResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:anyType"/> > + <xs:element name="return" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retQName"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inQName" > nillable="true" type="xs:anyType"/> > + <xs:element name="inQName" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retQNameResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:anyType"/> > + <xs:element name="return" nillable="true" > type="xs:anyType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retLong"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inLong" > type="xs:long"/> > + <xs:element name="inLong" type="xs:long"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retLongResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:long"/> > + <xs:element name="return" type="xs:long"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUInt"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inUInt" > type="xs:long"/> > + <xs:element name="inUInt" type="xs:long"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retUIntResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:long"/> > + <xs:element name="return" type="xs:long"/> > </xs:sequence> > </xs:complexType> > </xs:element> > + > <xs:element name="retByte"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inByte" > type="xs:short"/> > + <xs:element name="inByte" type="xs:short"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retByteResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:short"/> > + <xs:element name="return" type="xs:short"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retShort"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="inShort" > type="xs:short"/> > + <xs:element name="inShort" type="xs:short"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="retShortResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > type="xs:short"/> > + <xs:element name="return" type="xs:short"/> > </xs:sequence> > </xs:complexType> > </xs:element> > > Modified: > webservices/axis2/trunk/java/modules/integration/test-resources/generics/generics.wsdl > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/generics/generics.wsdl?rev=896798&r1=896797&r2=896798&view=diff > ============================================================================== > --- > webservices/axis2/trunk/java/modules/integration/test-resources/generics/generics.wsdl > (original) > +++ > webservices/axis2/trunk/java/modules/integration/test-resources/generics/generics.wsdl > Thu Jan 7 08:34:59 2010 > @@ -13,33 +13,33 @@ > <xs:element name="processStringList"> > <xs:complexType> > <xs:sequence> > - <xs:element maxOccurs="unbounded" minOccurs="0" > name="values" nillable="true" type="xs:string"/> > + <xs:element maxOccurs="unbounded" name="values" > nillable="true" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="processStringListResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="xs:string"/> > + <xs:element name="return" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="processStringArray"> > <xs:complexType> > <xs:sequence> > - <xs:element maxOccurs="unbounded" minOccurs="0" > name="values" nillable="true" type="ns:String"/> > + <xs:element maxOccurs="unbounded" name="values" > nillable="true" type="ns:String"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:complexType name="String"> > <xs:sequence> > - <xs:element maxOccurs="unbounded" minOccurs="0" > name="array" nillable="true" type="xs:string"/> > + <xs:element maxOccurs="unbounded" name="array" > nillable="true" type="xs:string"/> > </xs:sequence> > </xs:complexType> > <xs:element name="processPersonList"> > <xs:complexType> > <xs:sequence> > - <xs:element maxOccurs="unbounded" minOccurs="0" > name="persons" nillable="true" > + <xs:element maxOccurs="unbounded" name="persons" > nillable="true" > type="ax22:Person"/> > </xs:sequence> > </xs:complexType> > @@ -47,14 +47,14 @@ > <xs:element name="processPersonListResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element minOccurs="0" name="return" > nillable="true" type="ax22:Person"/> > + <xs:element name="return" nillable="true" > type="ax22:Person"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="getStringListResponse"> > <xs:complexType> > <xs:sequence> > - <xs:element maxOccurs="unbounded" minOccurs="0" > name="return" nillable="true" type="xs:string"/> > + <xs:element maxOccurs="unbounded" name="return" > nillable="true" type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > @@ -63,8 +63,8 @@ > targetNamespace="http://generics.axis2.apache.org/xsd"> > <xs:complexType name="Person"> > <xs:sequence> > - <xs:element minOccurs="0" name="age" type="xs:int"/> > - <xs:element minOccurs="0" name="name" nillable="true" > type="xs:string"/> > + <xs:element name="age" type="xs:int"/> > + <xs:element name="name" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:schema> > > Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java > URL: > http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=896798&r1=896797&r2=896798&view=diff > ============================================================================== > --- > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java > (original) > +++ > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java > Thu Jan 7 08:34:59 2010 > @@ -931,7 +931,6 @@ > if (isArryType && !isBase64Binary) { > elt1.setMaxOccurs(Long.MAX_VALUE); > } > - elt1.setMinOccurs(0); > if (!isPrimitive) { > elt1.setNillable(true); > } > @@ -1234,7 +1233,6 @@ > if (isArray) { > elt1.setMaxOccurs(Long.MAX_VALUE); > } > - elt1.setMinOccurs(0); > if (!("int".equals(schemaTypeName.getLocalPart()) || > "double".equals(schemaTypeName.getLocalPart()) || > "long".equals(schemaTypeName.getLocalPart()) || > > >