axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Iltchenko (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives
Date Mon, 30 May 2005 08:23:57 GMT
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66531 ]
     
Andrei Iltchenko commented on AXIS-2020:
----------------------------------------

Tom,

No, this is not by seeing nillable on that element, it is by seeing minOccurs="0" on the 

        <xsd1:sequence> 
          <xsd1:element minOccurs="0" maxOccurs="unbounded" name="int" type="xsd1:int"
/> 
        </xsd1:sequence>

which causes the fix to promote name's type to a wrapper class.

The old condition under which we carried out a wrapper promotion in JavaBeanWrapper is causing
this:
                    if (elem.getMinOccursIs0() || elem.getNillable() ||
		            elem.getOptional()) {

to fix it, we'll have to add an additional property to the ElementDecl class and change the
above condition to verify that the multiplicity of maxOccurs is set to exactly one. Fixing
this is not more than a few minutes of work, I'll do it.

Andrei.

> wsdl2java does not generate array of wrappers for array of nillable primitives
> ------------------------------------------------------------------------------
>
>          Key: AXIS-2020
>          URL: http://issues.apache.org/jira/browse/AXIS-2020
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>     Reporter: Hans
>  Attachments: 2020.txt
>
> For the following xsd construct:
> <xsd:complexType name="StructureType">
>     <xsd:all>
>         <xsd:element name="fld1" type="xsd:int" 
>             nillable="true" minOccurs="0" maxOccurs="unbounded"/>
>         <xsd:element name="fld2" type="s0:intarr" minOccurs="0"/>
>     </xsd:all>
> </xsd:complexType>
> <xsd:complexType name="intarr">
>     <xsd:complexContent>
>         <xsd:restriction base="soapenc:Array">
>             <xsd:sequence>
>                 <xsd:element name="element" type="s:int" 
>                     nillable="true" minOccurs="0" maxOccurs="unbounded"/>
>             </xsd:sequence>
>         </xsd:restriction>
>     </xsd:complexContent>
> </xsd:complexType>
> wsdl2java from Axis 1.1 generates a Java Class like:
> class StructureType implements Serializable {
>     private Integer[] fld1;
>     private Integer[] fld2;
> ...
> But in Axis 1.2 the following is generated:
> class StructureType implements Serializable {
>     private int[] fld1;
>     private int[] fld2;
> ...
> This is incorrect - wrapper types should have been used for fld1 and fld2.
> Also reproducable on the nightly 1.2.1 build of 27 may 2005.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message