axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Maring <bambool...@yahoo.com>
Subject Re: Can't find default constructor exception on the client side
Date Fri, 15 Aug 2003 13:44:11 GMT
Yes.  You should only allow the BeanSerializer to manage your type mapping if you had the wsdl2java
process generate your beans or your WSDL was generated by a java2wsdl base on your beans,
which would have to be REAL JavaBeans with default constructors.  Otherwise, you will need
to plug in a custom serializer.  Given the nature of the objects you discribed, you may even
need to write your own marshaller.  I don't know if Castor, JAXB, XMLBeans, JiBX, Glue, or
any other marshallers will manage the type of abstraction you discribed.  Some allow you to
have your data types represented by interfaces, so that alternate implementations can be plugged
in.  Maybe you could use interfaces instead of abstract classes?
 
Anyway.  I just posted an example of plugging a custom serializer (Castor) into a HelloWorld
service.   see the recent thread on axis and castor.
 
Cheers.
Steve Maring


Stuart Barlow <sbarlow@peopledoc.com> wrote:I think that AXIS requires a default constructor
if you are using
bean based serialization.
Maybe possible with custom serialization? someone else know?


Harry_Wen@newyorklife.com wrote:
> Hi,
> I have an abstract class, Users, that is extended by several classes
> such as Administrator, Tester etc. My service method, LogIn, will return a
> User object upon successful login. I verify that a Users object is send
> back to the client. However, the client will throw an exception which
> indicate that a Java Bean can not be created because there is no default
> constructot for Users class.
> 
> This design is to hide the detail from the client program so that there
> is no testing logic for identifying the type of the user who logs in. Any
> suggestion to resolve this issue is highly appreciated.
> 
> 
> Harry Wen
> 
> 
> 



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Mime
View raw message