You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2004/02/06 19:00:10 UTC

[RT] zero-code web services from Flow

Based on http://wiki.cocoondev.org/Wiki.jsp?page=FlowAndWebServices, we 
talked a bit about this on IRC today and I did some research.

It looks like the "only" things missing are:

a) A rhino adapter (written in java, rhino extension), which accepts 
any method name and number of parameters, and delegates to a java 
InvocationHandler's invoke() method (or wrapper).

Rhino apparently provides all interfaces to do this, along with example 
implementations and/or base classes.

b) The actual InvocationHandler, which uses a web service's WSDL to 
find out about method names and signatures.

IIUC Axis does this painlessly.


This would allow Flow scripts to access web services transparently 
without having to write any code outside of flow, something like:

var parcelService = 
wsHelper.loadWebService('http://shipping.com/ws/parcelservice?WSDL');
parcelService.register(username,password);

At which point the rhino adapter is invoked and delegates to the java 
InvocationHandler which uses Axis to call the web service.

WDYT?

-Bertrand





Re: [RT] zero-code web services from Flow

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le Vendredi, 6 fév 2004, à 22:38 Europe/Zurich, Vadim Gritsenko a écrit 
:
>
> ...Sounds yummy... How much slower will it be comparing to good old 
> Axis - generated classes?

Compared to the network round-trip that any SOAP call implies, the 
difference might be negligible for most applications. But this will 
obviously need to be proven by actual code ;-)

- Bertrand


Re: [RT] zero-code web services from Flow

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Bertrand Delacretaz wrote:

> This would allow Flow scripts to access web services transparently 
> without having to write any code outside of flow, something like:
>
> var parcelService = 
> wsHelper.loadWebService('http://shipping.com/ws/parcelservice?WSDL');
> parcelService.register(username,password);
>
> At which point the rhino adapter is invoked and delegates to the java 
> InvocationHandler which uses Axis to call the web service.


Sounds yummy... How much slower will it be comparing to good old Axis - 
generated classes?

Vadim


Re: [RT] zero-code web services from Flow

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le Vendredi, 6 fév 2004, à 20:44 Europe/Zurich, Davanum Srinivas a 
écrit :

>
> For #2 - See DynamicInvoker in Axis
> (http://cvs.apache.org/viewcvs.cgi/ws-axis/java/samples/client/)

Thanks - looks like just what we need!

-Bertrand


Re: [RT] zero-code web services from Flow

Posted by Davanum Srinivas <di...@yahoo.com>.
For #2 - See DynamicInvoker in Axis
(http://cvs.apache.org/viewcvs.cgi/ws-axis/java/samples/client/)

-- dims

--- Bertrand Delacretaz <bd...@apache.org> wrote:
> Based on http://wiki.cocoondev.org/Wiki.jsp?page=FlowAndWebServices, we 
> talked a bit about this on IRC today and I did some research.
> 
> It looks like the "only" things missing are:
> 
> a) A rhino adapter (written in java, rhino extension), which accepts 
> any method name and number of parameters, and delegates to a java 
> InvocationHandler's invoke() method (or wrapper).
> 
> Rhino apparently provides all interfaces to do this, along with example 
> implementations and/or base classes.
> 
> b) The actual InvocationHandler, which uses a web service's WSDL to 
> find out about method names and signatures.
> 
> IIUC Axis does this painlessly.
> 
> 
> This would allow Flow scripts to access web services transparently 
> without having to write any code outside of flow, something like:
> 
> var parcelService = 
> wsHelper.loadWebService('http://shipping.com/ws/parcelservice?WSDL');
> parcelService.register(username,password);
> 
> At which point the rhino adapter is invoked and delegates to the java 
> InvocationHandler which uses Axis to call the web service.
> 
> WDYT?
> 
> -Bertrand
> 
> 
> 
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/