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 GEORGE MCKINNEY <gh...@shaw.ca> on 2005/12/01 03:36:37 UTC

Are Restrictions ignored by wsdl2java?

We used the wsdl2java to generate the types etc needed for a client that will talk SOAP.

Things are working (with a few tweaks ), but I notice that although the schema includes bits like:

    <xs:simpleType name="ClientNumber">
        <xs:restriction base="xs:string">
            <xs:pattern value="[A-Z0-9]{1,9}" />
        </xs:restriction>
    </xs:simpleType>

defining the type of an Element, the generated Java doesn't (as far as I can tell ) enforce that at all, although it does generate enumeration type classes for xml like: 

    <xs:simpleType name="ProductType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="AAA" />
            <xs:enumeration value="BBB" />
            <xs:enumeration value="CCC" />
        </xs:restriction>
    </xs:simpleType>

Is this the way it is intended to work, or am I missing something?

Thanks,
George McKinney