This week's giveaway is in the Java/Jakarta EE forum.We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!See Tomcat 4.1 with Axis 1.2. I am not able to generate Client side code using WSDL2Java. I am getting this error:

java.io.IOException: Type {http://util.java}Enumeration is referenced but not defined. at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361) at java.lang.Thread.run(Thread.java:534)

- The class java.util.Enumeration is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.

What does it mean ?

The error after launch wsdl2tojava command remains:

java.io.IOException: Type {http://util.java}Enumeration is referenced but not defined. at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665) at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518) at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361) at java.lang.Thread.run(Thread.java:534)

Tim West

Ranch Hand

Posts: 539

posted 12 years ago

OK, you've imported namespace "http://util.java" and associated it with namespace identifier 'tns3'. You've then referred to a type (presumably) defined by that namespace in lines like these:

However, you aren't providing a schema for namespace "http://util.java", so wsdl2java is complaining. AFAIK, you either need to add an xsi:schemalocation, or (and I find this easier with Axis) rewrite the current schema to not refer to an external one.

If you're not familiar with XML schemas, namespaces and the idea of importing schemas, you really need to learn these concepts before you can fix this problem.

By the way, did you write this schema/WSDL yourself, or generate it with a tool?

-Tim

Lillo Birillo

Greenhorn

Posts: 8

posted 12 years ago

The wsdl file was generated by Axis.

I have used Axis just in order not to have to learn these concepts. But now, I think I'll learn them.

Thanks for now...

Ciao.

Tim West

Ranch Hand

Posts: 539

posted 12 years ago

That was the way I learned too - initially I didn't know the messy details of XML Schema, WSDL, SOAP etc, but in the end I had to learn them to be able to identify and resolve bugs and problems.

Good luck!

-Tim

Your mind is under my control .... your will is now mine .... read this tiny ad