Child pages
  • Online mode with CXF
Skip to end of metadata
Go to start of metadata

Setting up OWLSBuilder in online mode with CXF gives the possibility of deploying services and having the OWL-S descriptions automatically generated on the fly where they contain OWLSBuilder annotations.

Service Deployment

Services may be deployed through any JAX-WS compatible environment (with some caveats - this is only tested using CXF - some users have reported problems with glassfish)

If you would like OWL-S descriptions to be deployed on the fly and published in an online repository then the following instructions will be of use. This requires the following:

  • That services are being published through Apache CXF using a spring configuration
  • Services are published under a path which is different from the servlet root (e.g. /cxfservices/ws/FooService rather than /cxfservice/FooService)

An example webapp is provided in source distribution, build it by running {{ ant build.webapp}} - this builds a webapp in the dist/webapp directory.


In addition to the standard CXF/Spring dependencies you will also need the following in your webapp

  • OWLSBuilder.jar
  • owls-api-3.0-bath.jar (and dependencies)
  • slf4j.jar
  • spring-mvc

For repository support you will also need:

  • quartz
  • alive-repository-server.jar

Images of the currently supported dependences are available from our anonymous SVN server here:

Webapp setup:

Assuming that you have a web.xml which looks something like this::

* add classpath:edu/bath/owlsbuilder/servlet/cxf/applicationContext.xml (required) to your contextConfiguration parameter

  • Create an owls servlet as follows:
  • And a mapping as follows:

The resulting web.xml should look something like:

create a file and put it into your webapp classpath (e.g. WEB-INF/classes) for example:

* The owlsbuilder.hostbase property is the URL which is prefixed before the context path when URLs are exposed to the outside world

  • The owlsbuilder.repositoryserver property sets the location of an Alive Repository - this can be used to discover referenced ontologies for generating OWL-S Descriptions


Finally Deploy the webapp to a compatible java servlet container (e.g. Tomcat/Jetty etc) - you should be able to view the list of semantic services by browsing to the page /servletname/owls/

If you want to register your services to be picked up by an ALIVE repository server the URL of the discovery file is : /servletname/owls/

  • No labels