Please see Computing Services' blog post for more details
The tool was developed using CXF as a JAX-WS implementation for deploying
service endpoints, however, it should work with any JAX-WS implementation.
In this document however, only CXF will be described.
The wrapper also makes extensive use of ASM.
- First, install CXF into a servlet container of your choice (such as Apache Tomcat, which is what was used during the development of the tool).
- Copy the Bath OWL-S API (and dependencies) to WEB-INF/lib.
- Copy the jar for ASM 3.3 to WEB-INF/lib.
- Build the wrapper with ant (first altering build.properties to point to the ALIVE common dependencies directory), and copy the compiled jar to WEB-INF/lib.
- Add the following to your web.xml:
In the top level directory of the CXF installation (e.g. tomcat/webapps/cxf), you need to create an alivecomposer.xml file. This is the configuration file for the wrapper tool, and defines which OWL-S services are to be wrapped, the name of the new wrapper service, and optinally (if using the non-synthetic mode), a set of XSL transformations.
An example file:
In the above example, a service is created from the OWL-S description stored in AddServiceSimple.owl, and is deployed at in this case /testsvc since CXF has been configured to deploy endpoints underneath _http://localhost:8080/cxf/services/_.
What follows are the transformations which are used when invoking the service directly, without going through the synthesised interface. These are themselves XML documents, and as such must either be escaped, or wrapped in <![CDATA[ ]]> tags. Each transformation must have the URI of the parameter, and an XSLT associated with that. Input parameters need to have an XSLT to transform the SOAP request message to RDF, and output parameters, from RDF to XML for inclusion in the SOAP response.
When the servlet is loaded, this configuration file is read, and the service endpoint is deployed. It is now listening for SOAP messages.
In the above example, in addition to the testsvc endpoint, a testsvcSynthetic endpoint is also deployed, which contains the synthesised service. One can access the WSDL for this service at, for example, testsvcSynthetic?wsdl. This can be used with the normal tools, such as wsimport to generate stubs or invoke the service in another way. OWL types are automatically converted into beans, and when these beans are passed to the service, they are automatically mapped back into OWL.