You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by dominic <cx...@nopol.de> on 2012/11/08 11:28:06 UTC

Creating an proxy servicelayer for javascript

hi!

i want to create dynamically webservices on the server-side. the webservice
should be executed in rhino (javascript), the data is collected out of a
database and already parsed with rhino. (function names, parameter, etc.)
which steps i have to take to create webservices out of my javascript files?

i think i have to create some kind of proxy java class to run javascript
code by method call. but i want to provide an exactly method/operation
description to the client side by wsdl. so i have to create my own service
layer, isnt it? how do i create multible services with my own service layer?

I think i have to overwrite / extend the ServiceFacoryBean to create the
ServiceInfo (InterfaceInfo, BindingsInfo and EndpointInfo). But how do i
create this objects correctly? What have to be implemented by me to create
this JavaScriptProxyWebServiceService ?

best regads and thank you for your help




--
View this message in context: http://cxf.547215.n5.nabble.com/Creating-an-proxy-servicelayer-for-javascript-tp5718121.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Creating an proxy servicelayer for javascript

Posted by dominic-2 <cx...@nopol.de>.
Hi Daniel! 

Thank you for your answer and your hint! I looked into this, this seems to
be just an adapter for the wsdlBuilder Service from CXF. I want to provide
an javascript service without handling with the wsdl-file itself. 

is it possible to handle it automatically?



--
View this message in context: http://cxf.547215.n5.nabble.com/Creating-an-proxy-servicelayer-for-javascript-tp5718136p5718191.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Creating an proxy servicelayer for javascript

Posted by dominic <d....@adito.de>.
Hi Daniel!

Thank you for your answer and your hint! I looked into this, this seems to
be just an adapter for the wsdlBuilder Service from CXF. I want to provide
an javascript service without handling with the wsdl-file itself.

is it possible to handle it automatically?



--
View this message in context: http://cxf.547215.n5.nabble.com/Creating-an-proxy-servicelayer-for-javascript-tp5718136p5718189.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Creating an proxy servicelayer for javascript

Posted by dominic <d....@adito.de>.
Refering to
http://cxf.547215.n5.nabble.com/creating-an-proxy-servicelayer-for-javascript-td5718123.html
----

Hi Daniel! 

Thank you for your answer and your hint! I looked into this, this seems to
be just an adapter for the wsdlBuilder Service from CXF. I want to provide
an javascript service without handling with the wsdl-file itself. 

is it possible to handle it automatically?



--
View this message in context: http://cxf.547215.n5.nabble.com/Creating-an-proxy-servicelayer-for-javascript-tp5718136p5718192.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Creating an proxy servicelayer for javascript

Posted by Daniel Kulp <dk...@apache.org>.
On Nov 8, 2012, at 5:28 AM, dominic <cx...@nopol.de> wrote:

> hi!
> 
> i want to create dynamically webservices on the server-side. the webservice
> should be executed in rhino (javascript), the data is collected out of a
> database and already parsed with rhino. (function names, parameter, etc.)
> which steps i have to take to create webservices out of my javascript files?
> 
> i think i have to create some kind of proxy java class to run javascript
> code by method call. but i want to provide an exactly method/operation
> description to the client side by wsdl. so i have to create my own service
> layer, isnt it? how do i create multible services with my own service layer?
> 
> I think i have to overwrite / extend the ServiceFacoryBean to create the
> ServiceInfo (InterfaceInfo, BindingsInfo and EndpointInfo). But how do i
> create this objects correctly? What have to be implemented by me to create
> this JavaScriptProxyWebServiceService ?
> 
> best regads and thank you for your help

It might be even easier than you think.   CXF does have some built in support for using Rhino to expose services written in javascript.   See:

http://cxf.apache.org/docs/javascript.html

and the js_provider sample in the cxf download.    That may provide some starting points.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com