axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Why can't you assume a bean type for interfaces in java2wsdl?
Date Thu, 18 Sep 2003 12:39:27 GMT

Hi Josh,

In order for Axis to create a JavaBean, it must have a default constructor because Axis creates
the object and then uses the setter methods to set the data elements in the bean.  If you
don't have a default constructor, Axis can create the object in the first place.  It would
have to figure out the order of the constructor arguments.

I am not sure how this relates to interfaces being used as part of a service description.

I hope this helps.

--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Josh Rehman [mailto:jrehman@citysearch.com] 
Sent: Thursday, September 18, 2003 5:27 AM
To: axis-dev@ws.apache.org
Subject: Why can't you assume a bean type for interfaces in java2wsdl?

Hi,

What is the reasoning behind not permitting interfaces to be used as 
part of the service description? When i do this the following message is 
generated from java2wsdl:

      [java] 0 [main] WARN fromJava.Types  - The class 
citysearch.sum.UserView 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.

It seems like it would be reasonable to assume that the interface is 
"beanAble" even if it doesn't have a constructor. Certainly this would 
have saved me much pain (as I implemented a default implementation which 
silently overrode a generated bean - very hard to track down!).

Thanks,
Josh

Mime
View raw message