This is very similar to the way we did it. I extend the RPCProvider to 
implement the backend and method searching by overloading the 
getNewServiceObject method. The method finds the interface class 
describing the service by download it from a remote server (Jini 
lookup). The class name is defined in the wsdd's className attribute. 
Once the class is found, it constructs a java.lang.reflect.Proxy from 
the interface. When a call to the proxy is made by Axis, my 
InvocationHandler will pass that to a pluggable layer to implement the 
actual backend invocation.

We have similar reason for implementing invocation without deployment 
because our services are implemented in Jini and potentially has a short 
lifespan. Keeping up with the dynamic deployment of the class files 
would be very difficult indeed.

William

Thomas Börkel wrote:

> HI!
> 
> I can describe how I did it:
> 
> I have ONE service deployed (I can provide the deployment wsdd, if you want, I 
>deploy at runtime with a string) with a dummy class and method and my own transport 
>always tells Axis to use that one service. Also, the transport sets the real class 
>name as property in the MessageContext.
> 
> For the service, I have defined my own provider. This provider ignores the class and 
>object that Axis gives to the provider in processMessage() and instead reads the 
>class name from the MessageContext.
> 
> It is required to have your own transport if you want to do it that way, AFAIK.
> 
> An alternative to my method, would be for the transport to deploy the 
>services/classes dynamically at the first call to this class. This way, Axis would 
>get the real class and object and give it to my provider. This is a change I *may* 
>make sometime.
> 
> With the proposed change, I can derive from RPCProvider, override some methods and 
>implement my own method search, invocation and security with little effort. Before, I 
>derived from JavaProvider and copied the SOAP request analyze and SOAP answer compose 
>code from RPCProvider.
> 
> The reason, we needed invocation without deployment is the fact, that we expose 
>around 200 java classes as web services. To keep the Java classes always in sync with 
>the deployment WSDDs during development (the client comes also from us) would be a 
>real pain.
> 
> Requests for WSDL are satisfied on the fly.
> 
> If you need further information, feel free to ask.
> 
> Regards,
> Thomas
> 
> 
>>-----Original Message-----
>>From: William Lee [mailto:[EMAIL PROTECTED]]
>>Sent: Freitag, 8. März 2002 12:30
>>To: [EMAIL PROTECTED]
>>Subject: Re: Proposed change for RPCProvider.java for Beta 1
>>
>>
>>Changes posted by Thomas Börkel seems to be related to my proposal on 
>>implementing the dynamic RPCProvider, is there any more 
>>information on 
>>how to perform your "invocation without deployment" in the 
>>Axis framework?
>>
>>William Lee
>>
>>Thomas Börkel wrote:
>>
>>
>>>HI!
>>>
>>>I have made a few minor changes (only extract code from 
>>>
>>processMessage() to seperate methods) in RPCProvider.java 
>>(please find attached) that allow us much more easily to do 
>>our own invocation without deployment (one service deployed 
>>for all our classes).
>>
>>>These are the changes:
>>>- added MessageContext parameter to getMethod()
>>>- added method invokeMethod()
>>>- added method checkMethodName()
>>>
>>>It would be EXTREMELY helpful, if you could commit these 
>>>
>>changes into Beta 1.
>>
>>>Thanks!
>>>
>>>Regards,
>>>Thomas
>>>
>>>
>>>
>>
>>
>>-- 
>>
>>William Lee
>>
>>Imperial College of Science Technology and Medicine
>>Room 354, Department of Computing,
>>180 Queen's Gate
>>London SW7 2BZ, U.K.
>>
>>email:[EMAIL PROTECTED]
>>web:www.image-union.com
>>
>>
>>
> 



-- 

William Lee

Imperial College of Science Technology and Medicine
Room 354, Department of Computing,
180 Queen's Gate
London SW7 2BZ, U.K.

email:[EMAIL PROTECTED]
web:www.image-union.com


Reply via email to