AXIS2 Web Services

From Informatics

Jump to: navigation, search

Currently we have three pojo-based AXIS2 web services in use: t-test, ANOVA, and hierarchical clustering. One of the main reason of this setting is to reuse the geWorbench component code directly so we have as little as possible code management issue. The services are created from the geWorkbench component directory with minimal wrapping mechanism.

Building and Deployment

Assume you start with a bare-done new installation of tomcat.

 1. Install axis2: download axis2, extract it, find the file called axis2.war, copy it to directory $CATALINA_HOME/webapps. You may need to restart tomcat to make sure it is expended. For more detailsand example, see http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
 2. set environment variable AXIS2_HOME to point to the axis2 home directory

The above steps only need to be done once. For each service, you need to:

 1. create the aar file by running the 'generate.service' task from the build.xml of that that particular component
 2. copy the aar file to $CATALINA_HOME/webapps/axis2/WEB-INF/services/.

The URL to access the service is like this (Note the name "HierClusterService" in this case is the 'name' attribute of the service element in src/META-INF/services.xml)

The URL to access the wsdl is to add ?wsdl after that, like this

Thin layer wrapping of the component

There are a few additional files in the component directory that are not used by the desktop application components themselves, but serve the purpose of creating the service deployment aar file.

  • build.xml
  • src/META-INF/services.xml (generate.service target in build.xml will pick up this file)
  • a class that maps the service element in src/META-INF/services.xml. For example, in case of hierarchical clustering, this is org.geworkbench.components.hierarchicalclustering.service.HierClusterService
Personal tools