You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Paul Andrews <pa...@cisco.com> on 2003/04/23 23:12:35 UTC

Java2WSDL and interfaces...

Hi,

I would like to suggest that the check for a default constructor in
.../wsdl/fromJava/Types.java for the serialization of beans be removed.
My reasons are as follows:

All that java2wsdl is doing is to convert some classes into an XML
schema. These classes are not necessarily the ones that will be used to
implement the service - in particular they might not be classes at all,
they might be interfaces.

Axis itself does not make this same check in the bean serializer class -
it doesn't need to, since it isn't actually ever creating an instance of
one of the 'beans'.

I can provide BeanInfo classes for my interfaces that enable the bean
serializer to work well with interfaces rather than beans.

I can provide wsdd files that map schema types to concrete
implementations that are different from the ones used to generate the
WSDL files.

As you might have guessed, I have defined my web service in terms of
Java interfaces - including the serialized objects. This is good
programming practice for Java - I have no reason to mandate a particular
implementation of the interfaces. I would like to be able to carry that
through seamlessly into my work with web services. Currently I am
commenting this check out with each new version of Axis, I would
obviously prefer not to do this.

P.S. if the tone of this email seems a bit demanding - it isn't meant to
be, I'm just trying to pre-empt a long email discussion by making my
case as clearly as possible :-)