[
http://issues.apache.org/jira/browse/AXIS-2552?page=comments#action_12431015 ]
Jose Manuel Valladares Pernas commented on AXIS-2552:
-----------------------------------------------------
More differences between the code produced by WSDL2Java in versiona 1.2.1 and
1.4.
I have a class OrganizationTypeOrgMemberName that inherits from PersonNameType,
when I use WSDL2Java 1.4 the constructor of the OrganizationTypeOrgMemberName
puts the parameters in the incorrect order when calling the super.
But in version 1.2.1 the constructor doesn't call the super.
Here I show the code generated by both versions.
With WSDL2Java from axis 1.2.1:
public class OrganizationTypeOrgMemberName extends
org.opentravel.www.OTA._2003._05.PersonNameType implements
java.io.Serializable {
private java.lang.String ID; // attribute
private java.lang.String level; // attribute
private java.lang.String title; // attribute
public OrganizationTypeOrgMemberName() {
}
public OrganizationTypeOrgMemberName(
java.lang.String ID,
java.lang.String level,
java.lang.String title) {
this.ID = ID;
this.level = level;
this.title = title;
}
With WSDL2Java from axis 1.4:
public class OrganizationTypeOrgMemberName extends
org.opentravel.www.OTA._2003._05.PersonNameType implements
java.io.Serializable {
private java.lang.String ID; // attribute
private java.lang.String level; // attribute
private java.lang.String title; // attribute
public OrganizationTypeOrgMemberName() {
}
public OrganizationTypeOrgMemberName(
org.opentravel.www.OTA._2003._05.ShareSynchInd shareSynchInd,
org.opentravel.www.OTA._2003._05.ShareMarketInd shareMarketInd,
java.lang.String nameType,
java.lang.String[] namePrefix,
java.lang.String[] givenName,
java.lang.String[] middleName,
java.lang.String surnamePrefix,
java.lang.String surname,
java.lang.String[] nameSuffix,
java.lang.String[] nameTitle,
java.lang.String ID,
java.lang.String level,
java.lang.String title) {
super(
shareSynchInd,
shareMarketInd,
nameType,
namePrefix,
givenName,
middleName,
surnamePrefix,
surname,
nameSuffix,
nameTitle);
this.ID = ID;
this.level = level;
this.title = title;
}
The compilation in version 1.4 fails because the declaration of the constructor
of PersonNameType is:
public PersonNameType(
java.lang.String[] namePrefix,
java.lang.String[] givenName,
java.lang.String[] middleName,
java.lang.String surnamePrefix,
java.lang.String surname,
java.lang.String[] nameSuffix,
java.lang.String[] nameTitle,
org.opentravel.www.OTA._2003._05.ShareSynchInd shareSynchInd,
org.opentravel.www.OTA._2003._05.ShareMarketInd shareMarketInd,
java.lang.String nameType) {
this.namePrefix = namePrefix;
this.givenName = givenName;
this.middleName = middleName;
this.surnamePrefix = surnamePrefix;
this.surname = surname;
this.nameSuffix = nameSuffix;
this.nameTitle = nameTitle;
this.shareSynchInd = shareSynchInd;
this.shareMarketInd = shareMarketInd;
this.nameType = nameType;
}
And the parameters are in different order.
The same error is produced when I compile the version of axis 1.4 from SVN.
> Java classes generated by wsdl2java don't compile
> -------------------------------------------------
>
> Key: AXIS-2552
> URL: http://issues.apache.org/jira/browse/AXIS-2552
> Project: Apache Axis
> Issue Type: Bug
> Components: WSDL processing
> Affects Versions: 1.4
> Environment: Linux OpenSuse 10.1
> Java JDK 1.5.0_06-b05
> Apache Axis 1.4
> Reporter: Jose Manuel Valladares Pernas
> Attachments: files.ZIP
>
>
> I have an wsdl that imports several xsd schemas and I
> used an ant task with WSDL2Java to produce the
> corresponding java clases.
> WSDL2Java produces the classes and no errors. But some
> of the generated classes don't compile.
> One of the classes has 2 constructor methods that are
> the same. Other classes that inherite from some parent
> classes have the constructor parameters in the wrong
> order.
> The schema files should be correct as they come from the OTA specification.
> I am attaching the files I am using in a zip file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]