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 "Dovholuk, Clint" <Cl...@GlobalCrossing.com> on 2005/08/29 21:28:00 UTC

WSDL2JAVA fails to create classes from wsdl on regex restricted simpleTypes

Hello all,

I noticed recently that WSDL2JAVA will not create any classes whatsoever
when given a simpleType that is a restriction of string.  Take a simple
phoneNumber example:

        <xsd:schema>
          <xsd:complexType name="PhoneNumberTest">
            <xsd:sequence>
              <xsd:element name="phoneNumber" type="PhoneNumber"/>
            </xsd:sequence>
          </xsd:complexType>
          <xsd:simpleType name="PhoneNumber">
            <xsd:restriction base="xsd:string">
              <xsd:pattern
value="[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9]"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:schema>

WSDL2JAVA will produce one class name PhoneNumberTest as you'd expect.
But there will be no "PhoneNumber.java" produced.

This is causing me issues as I'm writing my wsdl first and then
generating the classes with WSDL2JAVA.  While I don't expect WSDL2JAVA
to provide the validation ( though that'd be really great ), I do expect
it to generate a class for the file.

Is this expected behavior? Is it a bug? Does anyone have any info
regarding this?

Thanks to all,
-Clint