Home Projects Dynamic-WS
Dynamic-WS Overview Print E-mail

Dynamic-WS brings dynamicity to Web Services allowing them to be installed, updated and uninstalled at runtime. Using Dynamic-WS, Web Services are deployed in bundles. Dynamic-WS can be easily used in non-osgi Web Applications, making it the ideal solution for upgrading existing Web Services to be dynamic without changing the Servlet Container or the Application Server in use.

Dynamic-WS is designed in a way that allows the installed Web Services process requests not only while they are being updated, but also while Dynamic-WS itself is being updated, so you can upgrade Web Services and Dynamic-WS while being sure that the process will have no implications on the behavior or performance of your application. This makes Dynamic-WS not only the best variant to implement Dynamic Web Services in OSGi, but also the most efficient approach for updating Web Services at runtime.

Dynamic-WS is not specific to a certain Web Service Engine, but currently JAX-WS Reference Implementation is the only one supported. The work for supporting Apache Axis2 and Apache CXF is currently in progress.

Example

This example contains a single Web Service deployed in a bundle, the Web Service can be uninstalled, updated and re-installed at runtime.

The WAR file for this application can be downloaded from here. A Tomcat instance with the example Web Application can be downloaded from here. A standalone OSGi-based application that runs with an HTTP Service can be downloaded from here.

How Dynamic-WS works?

For Dynamic-WS to work, a delegator servlet that will delegate requests to Dynamic-WS need to be registered in the Web Application and Dynamic-WS bundles need to be installed in the OSGi Environment. Dynamic-WS will scan all of the bundles in the OSGi Environment for Web Service descriptors, if Web Service descriptors are found Dynamic-WS will generate Web Services from them using a Web Service Engine determined by the Web Service Descriptor.

By default, unless you download only Dynamic-WS bundles, Dynamic-WS comes in a WAR file for a Web Application inside of which an OSGi-based Application that contains Dynamic-WS bundles is embedded. The web.xml file of the Web Application has the delegator servlet configured. So all is left is to install the Web Service Bundles and their dependencies.