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 Dmitri Colebatch <di...@colebatch.com> on 2002/11/26 12:37:31 UTC

anySimpleType as base type

hey all,

ok, I'm sure this is a newbie question, but I feel that I've perservered on
my own enough, and hopefully someone can now help me (o:

I've attached a small sample of WSDL that I'm trying to feed into WSDL2Java.
The problem is with this part:

      <xsd:simpleType name="PoItem">
        <xsd:restriction base="xsd:anySimpleType">
          <xsd:pattern value="[0-9]{5}"/>
        </xsd:restriction>
      </xsd:simpleType>

>From the searching I've done this seems to be valid, and XML-Spy doesn't
have any problem with it.  I'm wondering if its related to this bug
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14712).  I've tried both
release 1.0 and CVS as of now (26 Sept for the archives), and get this
error:

java.io.IOException: Type {http://www.w3.org/2001/XMLSchema}anySimpleType is
referenced but not defined.
 at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.j
ava:496)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:396)
 at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:382)
 at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:367)
 at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:246)
 at java.lang.Thread.run(Thread.java:479)

Now, the problem seems to be that anySimpleType isn't contained in the
SchemaUtils.schemaTypes array, but simply adding it there leads to a
"unsupported XSD type", which I cant say surprises me much - now, my
questions are:

1. Is the above (/attached) legal?
2. Assuming yes to (1), is added 'anySimpleType' to SchemaUtils.schemaTypes
the right thing to do, or will it have bad side effects?

thanks heaps for any advice.

cheers
dim