axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Manuel Valladares Pernas (JIRA)" <>
Subject [jira] Commented: (AXIS-2552) Java classes generated by wsdl2java don't compile
Date Fri, 22 Sep 2006 14:33:37 GMT
    [ ] 
Jose Manuel Valladares Pernas commented on AXIS-2552:

Here it is the error when the generated class has two constructors that are the same:

package org.opentravel.www.OTA._2003._05;

 * A union of money and percentage so that the appropriate data can
 * be sent in a single field.
public class MoneyOrPercentageType  implements, org.apache.axis.encoding.SimpleType
    private java.lang.String _value;
    public MoneyOrPercentageType() {

    // Simple Types must have a String constructor
    public MoneyOrPercentageType(java.lang.String _value) {
        this._value = _value;
    public MoneyOrPercentageType(java.math.BigDecimal _value) {

    public MoneyOrPercentageType(java.math.BigDecimal _value) {

It happens because the MoneyOrPercentageType is a union of the Money and Percentage that are
decimal both:

        <xs:simpleType name="Percentage">
                        <xs:documentation xml:lang="en">Used for percentage values</xs:documentation>
                <xs:restriction base="xs:decimal">
                        <xs:minInclusive value="0.01"/>
                        <xs:maxInclusive value="100.00"/>

        <xs:simpleType name="Money">
                        <xs:documentation xml:lang="en">Used for amounts, max 3 decimals</xs:documentation>
                <xs:restriction base="xs:decimal">
                        <xs:fractionDigits value="3"/>

        <xs:simpleType name="MoneyOrPercentageType">
                        <xs:documentation xml:lang="en">A union of money and percentage
so that the appropriate data can be sent in a single field.</xs:documentation>
                <xs:union memberTypes="Money Percentage"/>

This bug happens also in axis 1.2.1 and it is still there in the 1.4 snapshot of September

> Java classes generated by wsdl2java don't compile
> -------------------------------------------------
>                 Key: AXIS-2552
>                 URL:
>             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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message