Tuscany Hello World WS Sample

Overview

The Tuscany hello world ws sample shows using the Tuscany SCA runtime in a Tomcat environment providing a web service..

Setup

Set up your server as described in the Tomcat Setup.  If you are not configuring with the acceptance test the server, you will need to add helloworldws-SNAPSHOT.war to your Tomcat's webapp directory.

Running

This service can be invoked by either the Tuscany SCA helloworldwsclient sample or hello world Axis sample's client  sample.

Code Overview

The source files are physically organized as shown below:
+---main
¦   +---java
¦   ¦   ¦   sca.module
¦   ¦   ¦
¦   ¦   +---org
¦   ¦       +---apache
¦   ¦           +---tuscany
¦   ¦               +---samples
¦   ¦                   +---helloworldws
¦   ¦                           HelloWorldService.java
¦   ¦                           HelloWorldServiceComponentImpl.java
¦   ¦
¦   +---resources
¦       ¦   tuscany-model.config
¦       ¦
¦       +---wsdl
¦               helloworld.wsdl
¦
¦
+---webapp
    +---WEB-INF
            web.xml


sca.module Defines the SCA module, entryPoint and component. Defines for the HelloWorldServiceComponent component and the Java class that implements the component For the entryPoint it defines WSDL for the service, the Java interface provided by the service, and wires the service to the HelloWorldServiceComponent
HelloWorldService.java Defines the Java interface implemented by the component.
HelloWorldServiceComponentImpl.java Implements the SCA component. Uses the SCA service annotation tag on the class to show what SCA interface is being implemented.  Also uses the SCA Java annotation "Remotable" to indicate that a component implemented by this class can be referenced out side of the SCA module it resides in.
tuscany-model.config Maps the SCA Entry point WSDL to the physical WSDL file location.
helloworld.wsdl WSDL for the service.
web.xml Standard J2EE web application's web.xml