Volkmann, Mark wrote:
> -----Original Message-----hi,
> From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 12:10 PM
> To: Volkmann, Mark
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: Getting Started Sample Doc
>
>
> 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?
In my case, it's not that I necessarily want my web service to be defined by an interface, but I already have the interface because it is being used for accessing my service through an EJB. The implementation of my "service" is generic Java code and I want to be able to access that through either a stateless session bean or a web service. I'm hiding this detail from Java clients. They just know they are working with something that implements some interface.
therefore you need to create this _something_ :-)
in this case as interface is just to represent Java Bean then
you have just to implement dynamically all get/set methods
(for examples using JDK 1.3 Dynamic Proxy and
keeping values in Hashtable) and plug it into Axis
to use dynamic proxy when this interface is received
(do not ask how as i do not know enough about Axis
but Axis is *very* flexible so there should be a way to
do it by overriding a default deserialization factory ...).
interestingly enough in this case we have combinationof by-value
(on the wire all object state is transported) and by-reference semantics
(as you do not know *real* implementation but you provide stub for it)
it would be interesting to see if this can work.
thanks,
alek
ps. i am suspecting that if you work with EJBs then you will want to have
actual EJB stateful beans on client side too because even if they are represented
by interfaces in method signature parameters and return values still when serialized
actual class instances implementing those interfaces are serialized
but anyway it may depend heavily on you particular setup and current
description is too general to be able to knwo what is exactly happening ...
--
The ancestor of every action is a thought. - Ralph Waldo Emerson