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 Emma Wheeler <ew...@runservicenet.com> on 2002/08/05 10:48:59 UTC

Java2WSDL problem - bean superclass without default constructor

Hello,

I am having a problem with the Java2WSDL and WSDL2Java tools, which seems to have appeared with the beta-3 release.
I have a web service which returns a bean that extends a superclass with protected member variables and a protected default constructor.  The bean has a public default constructor.

When I run Java2WSDL, I get the following message:
The class <superclass classname> does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.


In the wsdl file, the element type is given as "xsd:anyType", but the message type is expecting the bean.  So when I run WSDL2Java using this wsdl file, I get the error message:

java.io.exception: Type {<namespace>}<bean name> is referenced but not defined.
at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:461)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:377)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:364)
 at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:350)
 at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:244)
 at java.lang.Thread.run(Unknown Source)

I had already created a different web service using another bean that extends an immutable superclass, using axis beta-2, and had no errors.

I am a relatively new and inexperienced axis user, and would be very grateful to hear if anyone has experienced or overcome a similar problem

Regards,
 
Emma Wheeler