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 deserialization.
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 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 04, 2002 12:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Getting Started Sample Doc
>
>
> You can also try taking a look at
> http://www.sosnoski.com/presents/java-xml/axis/axis-service.ht
> 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.
************************************************************************************
|