You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Andrew Tillman <at...@DigitalWork.com> on 2001/03/07 20:54:08 UTC

Idea for a SOAP Classloader

Hey everyone,

I'm new to this list, but I've been using Apache-SOAP for a few months.  I
had an idea and I am wondering how feasible it is.  What I was thinking is
the creation of a SOAPClassloader that would allow you to define that the
lookups for all classes under a given package are handled by the
Classloader, it loads up interface classes via something like an WSDL lookup
and then on the fly created SOAP stubs that implemented that interface.
These stubs would pass on method calls to the SOAP server.  Does anyone
think this is a feasible idea.

Andrew Tillman
Software Engineer
DigitalWork, Inc.
230 W. Monroe
Suite 2050
Chicago, IL 60606
P (312) 261-4128
atillman@digitalwork.com



Re: Idea for a SOAP Classloader

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Andrew Tillman wrote:

> I'm new to this list, but I've been using Apache-SOAP for a few months.  I
> had an idea and I am wondering how feasible it is.  What I was thinking is
> the creation of a SOAPClassloader that would allow you to define that the
> lookups for all classes under a given package are handled by the
> Classloader, it loads up interface classes via something like an WSDL lookup
> and then on the fly created SOAP stubs that implemented that interface.
> These stubs would pass on method calls to the SOAP server.  Does anyone
> think this is a feasible idea.

but how it can be useful? what i mean - how can you use dynamically loaded
interface - you do not know what methods are going to be there or do you? so how
your code can use it except for completely dynamic user interface where user can
type commands and arguments but then why to have overhead of classloader and
instead why not simply create soap envelope by hand (no need for java
interfaces).

however i think that it is very useful to compile WSDL to generate java
interface from it. and then based on WSDL you can use JDK 1.3 proxy to implement
remote interface remotely. it is feasible and it was already done in our SoapRMI
1.1 - you can do things like that:

    StockQuote serverRef = (StockQuote)
       soaprmi.soaprpc.SoapServices.getDefault().createStartpoint(
         "http://localhost:8080/soap/servlet/rpcrouter",
         new Class[]{StockQuote.class},
         "urn:xmltoday-delayed-quotes"
       );
    System.out.println("quote: "+serverRef.getQuote("IBM"));

where

public interface StockQuote extends soaprmi.Remote {
  float getQuote(String symbol) throws soaprmi.RemoteException;
}

and that is it - no need to event compile WSDL (or IDL) to generate
stubs/skeletons - they are done completely transparently by JDK1.3 dynamic
proxies..

thanks,

alek
--
Aleksander Slominski, LH 316, IU, http://www.extreme.indiana.edu/~aslom
As I look afar I see neither cherry Nor tinted leaves Just a modest hut
on the coast In the dusk of Autumn nightfall - Fujiwara no Teika (1162-1241)