As part of Axis2/OSGi integration process, we have implemented the basic facility to expose an OSGi service as a Web service. Still some of the advanced functionalities related to this function is in development stage and we will update the progress as we go alone.
In order to facilitate this, register OSGi service with Directory object with name/value pair "org.apache.axis2.osgi.ws/name of WS". This will create an AxisService with default Axis2 properties. This includes message receivers to be RPC*, default schema/targetNamespace generation etc.
You can test this out from here. Follow "axis2_osgi_integration.pdf" to set up the environment.
The example has registered a simple Calculator POJO as an OSGi service and exposed it as a WS. The name/value pair for this instance is "org.apache.axis2.osgi.ws/myCal". Then one will be able to observe
wsdl -> http://localhost:8080/services/myCal?wsdl
wsdl2 -> http://localhost:8080/services/myCal?wsdl2
A request -> http://localhost:8080/services/myCal/add?x=10&y=10
Showing posts with label OSGi. Show all posts
Showing posts with label OSGi. Show all posts
Monday, August 18, 2008
Saturday, July 5, 2008
Light weight, OSGi based, Axis2 powered, web services application server in 5 minuets
Few days back I blogged about "Embed Eclipse Equinox in a Servlet Container". Let's extend this idea a little bit more to write your own light weight, OSGi based, Axis2 powered, web services application server.
There is an ongoing effort to extend Axis2 Web Services engine to deploy as a bundle in an OSGi environment. The purpose of this extension is to allow deployed bundles to provide services and modules which will be recognized by OSGi based Axis2 engine and deploy them.
Let's create the light weight, OSGi based, Axis2 powered, web services application server using Eclipse Equinox OSGi implementation and Apache Tomcat.
1. Download Apache Tomcat
2. Download bridge.war from Eclipse Equinox.
3. Download commons logging (org.eclipse.equinox.common_3.3.0.v20070426.jar) bundle from Eclipse Equinox.
4. Copy the downloaded bridge.war to Apache Tomcat webapps directory
5. svn co https://svn.apache.org/repos/asf/webservices/axis2/scratch/java/saminda/osgi_test osgi_test
6. Go to osgi_test directory and type "mvn clean install -U". You need Maven2 build system.
7. Go to osgi_test/distribution/target directory and unzipped distribution-1.0.0.zip.
8. Copy all the bundles from distribution-1.0.0/plugin folder to/webapps/bridge/WEB-INF/eclipse/plugins and copy commons logging bundle too.
9. Restart Tomcat
10. On the osgi> command prompt start all bundles except fragment host bundles.
11. http://localhost:8080/bridge/services/Version?wsdl
http://localhost:8080/bridge/services/Version?wsdl2
http://localhost:8080/bridge/services/Version/getVersion
You have your personal light weight, OSGi based, Axis2 powered web services application server.
There is an ongoing effort to extend Axis2 Web Services engine to deploy as a bundle in an OSGi environment. The purpose of this extension is to allow deployed bundles to provide services and modules which will be recognized by OSGi based Axis2 engine and deploy them.
Let's create the light weight, OSGi based, Axis2 powered, web services application server using Eclipse Equinox OSGi implementation and Apache Tomcat.
1. Download Apache Tomcat
2. Download bridge.war from Eclipse Equinox.
3. Download commons logging (org.eclipse.equinox.common_3.3.0.v20070426.jar) bundle from Eclipse Equinox.
4. Copy the downloaded bridge.war to Apache Tomcat webapps directory
5. svn co https://svn.apache.org/repos/asf/webservices/axis2/scratch/java/saminda/osgi_test osgi_test
6. Go to osgi_test directory and type "mvn clean install -U". You need Maven2 build system.
7. Go to osgi_test/distribution/target directory and unzipped distribution-1.0.0.zip.
8. Copy all the bundles from distribution-1.0.0/plugin folder to
9. Restart Tomcat
10. On the osgi> command prompt start all bundles except fragment host bundles.
11. http://localhost:8080/bridge/services/Version?wsdl
http://localhost:8080/bridge/services/Version?wsdl2
http://localhost:8080/bridge/services/Version/getVersion
You have your personal light weight, OSGi based, Axis2 powered web services application server.
Thursday, June 26, 2008
Embed Eclipse Equinox in a Servlet Container
OSGi is dominant mobile phones and handheld devices. Now the interest has significantly moved from these embedded to full blown servers. Hence, people are looking at eliminating barriers using OSGi on servers.
Eclipse Equinox is pursing work related to "Server-Side Equinox". The target is to embed Equinox in a Servlet Container, using what is called the principle of "servletbridge" to run OSGi based application in a servlet container.
To test this out read here,
In summary.
1. Install your favourite servlet container (Tomcat, Jetty etc)
2. Download and deploy per-build web application archive (bridge.war)
3. Start the web container (http://localhost:8080/bridge)
4. There are bunch of things you can do, which will be available here.
"servletbridge" is a cool concept, which can be applied to any OSGi implementation, such as Apache Felix, Knopflerfish etc
Hence, WSO2 Carbon, the next generation web services infrastructure powered by enterprise Axis2 uses "servletbridge" concept to provide an OSGi environment to uses to embed bundles that mimic the behavior of Axis2 service & module archives.
Eclipse Equinox is pursing work related to "Server-Side Equinox". The target is to embed Equinox in a Servlet Container, using what is called the principle of "servletbridge" to run OSGi based application in a servlet container.
To test this out read here,
In summary.
1. Install your favourite servlet container (Tomcat, Jetty etc)
2. Download and deploy per-build web application archive (bridge.war)
3. Start the web container (http://localhost:8080/bridge)
4. There are bunch of things you can do, which will be available here.
"servletbridge" is a cool concept, which can be applied to any OSGi implementation, such as Apache Felix, Knopflerfish etc
Hence, WSO2 Carbon, the next generation web services infrastructure powered by enterprise Axis2 uses "servletbridge" concept to provide an OSGi environment to uses to embed bundles that mimic the behavior of Axis2 service & module archives.
Wednesday, June 25, 2008
New look to Apache Axis2 with OSGi
Apache Axis2 has span its spectrum with the incorporation of OSGi integration. This will be mainstream in next Axis2 main release. In summary, there exist an OSGi bundle, org.apache.axis2.osgi_.jar, which can be deployed in any OSGi environment. This bundle has few wire dependencies to other bundles, which can either be available in the OSGi implementation or one can simply create them using most popular bundling tools.
In order to better understand how this will work in Eclipse Equinox OSGi implementation, I have create a scratch project, which will be available here. Just do an svn checkout on prior url. Do follow the axis2_osgi_integration.pdf for more comprehensive detail of this effort.
In order to better understand how this will work in Eclipse Equinox OSGi implementation, I have create a scratch project, which will be available here. Just do an svn checkout on prior url. Do follow the axis2_osgi_integration.pdf for more comprehensive detail of this effort.
Subscribe to:
Comments (Atom)