Tuscany Web services Client Helloworld Sample

Overview

The Tuscany Web services client Helloworld sample shows how to call a remote Web service by wiring an SCA component to a reference which uses a Web service binding.

Location

This sample is located  in the samples\standalone\helloworldwsclient directory. All the following commands should be issued while working in the sample directory.

Prerequisites

Obtain the following prerequisites and install according to their documentation.

Building

To build the sample  issue :

mvn

The result after executing is in the target subdirectory the sample-helloworldwsclient.jar

Setup

Set up the Tuscany standalone runtime environment using the following command:

mvn dependency:unpack 

After completion there should be a target\distribution subdirectory created that has the Tuscany standalone runtime.

The Tuscany Web servivces binding requires the Axis2 and SDO databinding extensions so copy these to the standalone launcher extensions directory:

copy target\distribution\contrib\axis2-1.0-incubator-M2.jar target\distribution\extensions
copy target\distribution\contrib\databinding-sdo-1.0-incubator-M2.jar target\distribution\extensions

Running

Execute the following command: (cut and paste to command line)

java -jar target/distribution/bin/launcher.jar target/sample-helloworldwsclient.jar

Results

The sample when run should simply display to the standard output:

Hello World