I have a fairly complex xml schema provided to me that seems to cause
wsdl2java to generate some code that does not comple.  Specifically, I
end up with 2 constructors with the same argument type:

  public MoneyPercentageType(java.math.BigDecimal _value) {
    setMoneyValue(_value);
  }

  public MoneyPercentageType(java.math.BigDecimal _value) {
    setPercentageValue(_value);
  }

Here is a simplified version of the wsdl that illustrates the problem:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
        xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
        xmlns:xs="http://www.w3.org/2001/XMLSchema";>
    <wsdl:types>
                <xs:schema targetNamespace="http://foo.com";
                        xmlns="http://foo.com";>
                        <xs:attributeGroup name="CurrencyAmountGroup">
                                <xs:attribute name="Amount"
type="Money" use="optional"/>
                                <xs:attribute name="Percentage"
type="Percentage"
                                        use="optional"/>
                        </xs:attributeGroup>
                        <xs:simpleType name="Money">
                                <xs:restriction base="xs:decimal">
                                        <xs:fractionDigits value="3"/>
                                </xs:restriction>
                        </xs:simpleType>
                        <xs:simpleType name="MoneyPercentageType">
                                <xs:union memberTypes="Money Percentage"/>
                        </xs:simpleType>
                        <xs:simpleType name="Percentage">
                                <xs:restriction base="xs:decimal">
                                        <xs:minInclusive value="0.01"/>
                                        <xs:maxInclusive value="100.00"/>
                                </xs:restriction>
                        </xs:simpleType>
                </xs:schema>
    </wsdl:types>
</wsdl:definitions>

Reply via email to