You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Hans (JIRA)" <ax...@ws.apache.org> on 2005/05/27 13:39:57 UTC

[jira] Created: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

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


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


[jira] Resolved: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=all ]
     
Davanum Srinivas resolved AXIS-2020:
------------------------------------

    Resolution: Fixed

Applied patch.

thanks,
dims

> 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, 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


[jira] Updated: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Andrei Iltchenko (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=all ]

Andrei Iltchenko updated AXIS-2020:
-----------------------------------

    Attachment: 2020.txt

The attached patch fixes the problem.

> 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


[jira] Updated: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Andrei Iltchenko (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=all ]

Andrei Iltchenko updated AXIS-2020:
-----------------------------------

    Attachment: 2020.txt

A new patch that fixes the problem pointed out by Tom.

> 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, 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Hans (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66601 ]
     
Hans commented on AXIS-2020:
----------------------------

bug created for 2nd testcase: http://issues.apache.org/jira/browse/AXIS-2026

> 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, 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66487 ]
     
Tom Jordahl commented on AXIS-2020:
-----------------------------------

I am only seeing the first field become Integer with your patch Andrei.  The second is still int[].


> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Hans (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66462 ]
     
Hans commented on AXIS-2020:
----------------------------

The wrapArray option is not set and I still get primitive java arrays...

The JavaBeanWriter calls the getWrapperType method with "byte[]" as argument,
and the getWrapperType passes it on to get the wrapper type from the types table.
Of course the types table does not know of any wrapper for 'byte[]'. I think the method should remove the subscripts and return the wrapper type name with the subscripts...
Or would it be better to have the writer class pass a typename without subscripts to the getWrapperType method? 


> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66490 ]
     
Tom Jordahl commented on AXIS-2020:
-----------------------------------

This patch also causes the test/wsdl/datatypes test case to fail because of the ArrayOfInt complexType in the WSDL:
      <s:complexType name="ArrayOfInt">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="unbounded" name="int" type="s:int" />
        </s:sequence>
      </s:complexType>
      <s:element name="ArrayOfInt" nillable="true" type="s0:ArrayOfInt" />

The creates an ArrayOfInt bean with a member _int which has always been an int[], but with the patch changes to an Integer[].  I think it is seeing the nillable on the element (which maps to the Bean type) and getting it wrong, as the complexType does NOT have the nillable attribute, so the member of the Bean should be int[].

Andrei, do you want to take a crack at fixing the patch? Thanks.


> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Guillaume Sauthier (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66464 ]
     
Guillaume Sauthier commented on AXIS-2020:
------------------------------------------

By defaut wrapArray=true, so You have to explicitely tell Axis that you don't want array wrapping.

> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66461 ]
     
Tom Jordahl commented on AXIS-2020:
-----------------------------------

But the Schema explicitly sets the nilable=true option on the both the element (fld1) and the type (intarr) so we need to map these to Java types that can be null i.e. Integer.

> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Guillaume Sauthier (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66457 ]
     
Guillaume Sauthier commented on AXIS-2020:
------------------------------------------

By default (from 1.2), WSDL2Java try to avoid extra class generation : if WSDL declares a types that is only a wrapper around an array, WSDL2Java will directly use the array type, not the wrapper.

Try to unset the wrapArray option in WSDL2Java.

> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Hans (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66456 ]
     
Hans commented on AXIS-2020:
----------------------------

Traced the problem to the getWrapperType method in org.apache.axis.wsdl.toJava.Utils.java. It does not take array subscripts ("[]") into considation when retrieving the wrappertype. I will submit a patch.

> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Andrei Iltchenko (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66463 ]
     
Andrei Iltchenko commented on AXIS-2020:
----------------------------------------

I fixed the same problem with regard to parameters in Bug <http://issues.apache.org/jira/browse/AXIS-1191>.

This one should be trivial to fix.

> 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

>
> 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Hans (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2020?page=comments#action_66546 ]
     
Hans commented on AXIS-2020:
----------------------------

Patch works well, but only for first scenario. For soapenc arrays having an 
element with maxOccurs="unbounded" and nillable="true" wsdl2java still
does not generate a wrapper. Because I thought that both cases were
caused by the same problem I created one bug. I will submit another bug 
for the second testcase.

> 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, 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


[jira] Commented: (AXIS-2020) wsdl2java does not generate array of wrappers for array of nillable primitives

Posted by "Andrei Iltchenko (JIRA)" <ax...@ws.apache.org>.
     [ 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