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.

Location

This sample is located  in the samples\sca\helloworldws directory.

Setup

Set up your server as described in the Tomcat Setup.  If you are not using the pre-configured Tomcat server from the binary distribution, you will need to add sample-helloworldws-incubating-M1.war to your Tomcat's webapp directory.

Running

This service can be invoked by the Tuscany SCA helloworldwsclient or helloworldjsclient sample.

Code Overview

The source files are physically organized as shown below:
+---main
+---resources
¦ ¦ sca.module
¦ ¦
¦ +---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
helloworld.wsdl WSDL for the service.
web.xml Standard J2EE web application's web.xml

You may have noticed that there is no Java source for this components implementation.  There reason is this sample reuses the code from the helloworld sample to implement the service.