You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Julie McCabe <ju...@qub.ac.uk> on 2005/04/18 11:10:57 UTC

WSDL2Java parameter ordering

Hello,

I am using; 

Apache Axis version: 1.2RC2
Built on Jan 25, 2005 (02:00:55 EST)

I am looking for information on the WSDL2Java process, in particular the 
conversion rules which are applied - I cant find it on the site.  I am using 
Globus Toolkit 3.9.5 and this is an extract from their release notes:

"Parameter ordering for Axis generated files
 The Java WS Core 3.9.5 contains a newer version of Axis. With that version of 
Axis the ordering of parameters in the constructors of generated types has 
changed. The parameters are now sorted alphabetically. The code that creates 
an instance of some generated type using a constructor with multiple 
arguments might need to be checked and updated appropriately. This change 
does not affect the code that creates an instance of some generated type 
using a default constructor and sets the values using the individual setter 
methods. "

I am posting here as I am interested in why even though a <xsd:sequence> tag 
is used to explicitly order the elements of a type that this is ignored and 
the alphabetic order of the element names is used instead?

For example:

<xsd:element name="createResource">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="category" 
type='xsd:string'/>
                                <xsd:element name="domainConfigService" 
type='wsa:EndpointReferenceType'/>
                                <xsd:element name="domainConfigKey" 
type='xsd:string'/>
                                <xsd:element name="domainConfigDbUri" 
type='xsd:string'/>
                                <xsd:element name="resourceReferenceName" 
type='xsd:string'/>
                        </xsd:sequence>
                </xsd:complexType>
                </xsd:element>

generated Java type constructor:
CreateResource(String category, String domainConfigDbUri, String 
domainConfigKey, EndpointReferenceType domainConfigService, String 
resourceReferenceName)

I expect:
CreateResource(String category, EndpointReferenceType domainConfigService, 
String domainConfigKey, String domainConfigDbUri, String 
resourceReferenceName)

I am curious about the rationale behind this.

Many thanks,
Julie.