Hello,

When I define a set of type restrictions the WSDL2Java does not map all of
them ?

For example, here is a simple type definition:
<types>
  <xsd:schema targetNamespace="urn:common"
              xmlns="urn:common"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
    <xsd:simpleType name="UserIdentifier">
        <xsd:restriction type="TransactionCode"/>
        <xsd:restriction type="OpaqueIdentifier"/>
        <xsd:restriction type="xsd:string"/>
    </xsd:simpleType>
    <xsd:complexType name="TransactionCode">
        <xsd:sequence>
            <xsd:attribute name="transactionCode" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="OpaqueIdentifier">
        <xsd:sequence>
            <xsd:attribute name="opaqueIdentifier" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
  </xsd:schema>
</types>
This type definition is map into:
public class UserIdentifier  implements java.io.Serializable,
org.apache.axis.encoding.SimpleType {
    private TransactionCode value;

    public UserIdentifier() {
    }

    public UserIdentifier(TransactionCode value) {
        this.value = value;
    }

    // Simple Types must have a String constructor
    public UserIdentifier(java.lang.String value) {
        this.value = new TransactionCode(value);
    }
But there is nothing about OpaqueIdentifier ??? It this a well known bug ?
Why don't we have something like :
 * public UserIdentifier(TransactionCode value)
 * public UserIdentifier(OpaqueIdentifier value)
 * public UserIdentifier(String value)

Many thanks for your help,

Fabien


Reply via email to