Bad constructor parameter order for classes generated for complex types
-----------------------------------------------------------------------

         Key: AXIS-1842
         URL: http://issues.apache.org/jira/browse/AXIS-1842
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2RC3    
 Environment: Linux (debian testing distribution)
JDK 1.5.0_01
Axis 1.2RC3

    Reporter: Peter Canning
    Priority: Critical


WSDL2Java creates a JavaBean class corresponding to a complexType in the WSDL.  
The JavaBean class contains properties for each element in the complexType.  
The JavaBean class also contains a default constructor as well as a constructor 
taking a parameter for each property.  In Axis 1.2RC3, the constructor 
parameters are not in the order that the elements are declaraed in the 
complexType, as they were in Axis 1.2RC2.  Based on my limited testing, they 
appear to be in alphabetically order of parameter name, which is completely 
bogus.

For example, when processing the attached WSDL file with

java -cp $AXIS_JARS org.apache.axis.wsdl.WSDL2Java -O -1 -p org.imaginary.test 
-o axisRC2_stubs test.wsdl

in RC2, it produces a constructor like

    public T1(
           java.lang.String name,
           java.lang.Boolean size,
           java.lang.String[] links) {
           this.name = name;
           this.size = size;
           this.links = links;
    }

but in RC3, it produces a constructor like

    public T1(
           java.lang.String[] links,
           java.lang.String name,
           java.lang.Boolean size) {
           this.name = name;
           this.size = size;
           this.links = links;
    }

The constructor parameters should be in the same order as the elements were 
listed in the complexType definition.

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to