Hi, 

I'm unclear on whether Axis is supposed to enforce WSDL 'xsd:restriction'
tags or not.

Am I missing a flag that needs to be set at some point in the
development/deployment process, or is it not implemented?

I'm using Axis 1.2rc3 and WSDL2Java on WLS81.sp4, and all the restrictions
on length, character contents, etc. seem to get stripped out.

E.g:
                        <!-- Types for login credentials. -->
                        <xsd:simpleType name="passwordType">
                                <xsd:annotation>
                                        <xsd:documentation>
                                                password is a string of 6-30
chars.
                                        </xsd:documentation>
                                </xsd:annotation>
                                <xsd:restriction base="xsd:string">
                                        <xsd:minLength value="6"/>
                                        <xsd:maxLength value="30"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                        <xsd:complexType name="credentialsType">
                                <xsd:sequence>
                                        <!-- must have password -->
                                        <xsd:element name="password"
type="dis:passwordType"/>
                                </xsd:sequence>
                        </xsd:complexType>

turns into this in the server's deployed WSDL:

<complexType name="credentialsType">
        <sequence>
                <element name="password" type="xsd:string"/>
        </sequence>
</complexType>


According to JIRA, this is viewed as an enhancement, and doesn't seem to be
marked as fixed there:
http://issues.apache.org/jira/browse/AXIS-119


However in table 18-1 (page 136) of the JAX-RPC 1.1 spec:

    -----------------------------
    Derivation of new
    simple types by
    restriction of an
    existing simple type
    -----------------------------
    <xsd:simpleType name="myInteger">
        <xsd:restriction base="xsd:integer">
            <xsd:minInclusive value="10000"/>
            <xsd:maxInclusive value="99999"/>
        </xsd:restriction>
    </xsd:simpleType>
    -----------------------------
    Required



Any help greatly appreciated.

Thanks,
Rafi

Reply via email to