The Tuscany helloworld sample shows using the Tuscany SCA runtime in a J2SE environment loading a component client that
performs an asynchronous web service call with callback. The client uses a bi-directional (asynchronous) interface
that is supported by the web services binding (binding.ws) that it specifies. The component definition is given
implicitly by the Java code and the use of the @Callback
annotation.
This sample is located in the samples\standalone\helloworldwsclient-async directory. All the following commands should be issued while working in the sample directory.
Obtain the following prerequisites and install according to their documentation.
To build the sample issue :
mvn
The result after executing is in the target subdirectory the sample-helloworldwsclient-async-1.0-incubator-M2.jar
This sample depends on the Tuscany Hello World Async WS sample already running to execute successfully
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.
Each sample can require one or more Tuscany runtime extensions. For this sample copy from target\distribution\contrib to the target\distribution\extensions directory the following extensions:
axis2-1.0-incubator-M2.jar | Axis webservices binding |
databinding-sdo-1.0-incubator-M2.jar | SDO data biinding. |
Execute the following command: (cut and paste to command line)
java -jar target/distribution/bin/launcher.jar target/sample-helloworldwsclient-async-1.0-incubator-M2.jar
The sample when run should simply display to the standard
output:
Hello John