axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Sosnoski <>
Subject Re: Getting Started Sample Doc
Date Thu, 05 Dec 2002 18:10:10 GMT
In general it doesn't make sense to return an interface from a SOAP 
call. The issue here is that you're not actually passing an object - 
you're passing a collection of data values which each end is free to 
interpret in any way it wants. What good does it do to use an interface 
in this situation?

If all you want is to be able to define a JavaBean-interface that 
provides get/set methods for some data values, with that interface 
implemented by multiple classes, you should be able to do this using 
custom serialization. I haven't looked into the details of making this 
work for a case like yours, but you should be able to construct JavaBean 
serializers and deserializers based on a dummy class that just 
implements the interface methods, then have your serializer and 
deserializer basically just pass off to the JavaBean handling. On the 
deserialization side you'd need to override the JavaBean handling to 
construct the appropriate concrete class before doing the actual 

This won't happen automatically using Java2WSDL and WSDL2Java, though. 
The closest you could get would be by defining a dummy class that 
implements your interface and using that to define WSDL and in turn 
generate Java. You'd still need to extend that by adding your custom 
serialization handling, though.

  - Dennis

Volkmann, Mark wrote:

> Dennis,
> Suppose the getPerson method in your PersonLookup class returned a 
> Person instead of a PersonBean where Person is an interface that is 
> implemented by PersonBean.  In that case, I don't think running 
> Java2WSDL on PersonLookup would generate sufficient WSDL to be used as 
> input to WSDL2Java.  Is there are way to handle that case?  I'm 
> struggling with this exact case now.
> > -----Original Message-----
> > From: Dennis Sosnoski []
> > Sent: Wednesday, December 04, 2002 12:31 PM
> > To:
> > Subject: Re: Getting Started Sample Doc
> >
> >
> > You can also try taking a look at
> >
> > ml which
> > gives a run through of turning existing Java classes (passing
> > a bean as
> > the return value for a method call) into a service and client.
> |
> ***********************************************************************************
> WARNING: All e-mail sent to and from this address will be received or
> otherwise recorded by the A.G. Edwards corporate e-mail system and is
> subject to archival, monitoring or review by, and/or disclosure to,
> someone other than the recipient.
> ************************************************************************************
> |

View raw message