From ece4fd35da7b7fc76264776f81705e6b5b52d3e0 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:11:48 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835140 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/recursive/helloworldwsclient/readme.htm | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sca-java-1.x/branches/java-post-M1/samples/sca/recursive/helloworldwsclient/readme.htm (limited to 'sca-java-1.x/branches/java-post-M1/samples/sca/recursive/helloworldwsclient/readme.htm') diff --git a/sca-java-1.x/branches/java-post-M1/samples/sca/recursive/helloworldwsclient/readme.htm b/sca-java-1.x/branches/java-post-M1/samples/sca/recursive/helloworldwsclient/readme.htm new file mode 100644 index 0000000000..5a69727ad2 --- /dev/null +++ b/sca-java-1.x/branches/java-post-M1/samples/sca/recursive/helloworldwsclient/readme.htm @@ -0,0 +1,64 @@ + + + Tuscany +Hello World Web Sample + +

Tuscany Hello World WS Client Sample

+

Overview

+

The Tuscany hello world WS client sample shows using the +Tuscany SCA runtime in a J2SE environment invoking a web service.

+

Location

+This sample is located  in the samples\sca\helloworldwsclient +directory.
+ + +

Setup

This sample depends on the Tuscany runtime, Axis2, and the sample jar, + + + sample-helloworldwsclient-incubating-M1.jar + + +, all of these must be available on the classpath to run the sample. Additionally, one of the helloworld web services must be running, either the Tomcat version, helloworldws sample or the Celtix version, helloworldws-celtix sample. +
    +
+

Running

+ + In the directory samples/sca/helloworldwsclient use the JDK 1.5 java command to run the class helloworld.HelloWorldClient + +
Linux: java -cp ../../../lib/tuscany-runtime-incubating-M1.jar:../../../lib/axis2/tuscany-axis2-incubating-M1.jar:target/sample-helloworldwsclient-incubating-M1.jar helloworld.HelloWorldClient
+
Windows: java -cp ../../../lib/tuscany-runtime-incubating-M1.jar;../../../lib/axis2/tuscany-axis2-incubating-M1.jar;target/sample-helloworldwsclient-incubating-M1.jar helloworld.HelloWorldClient
+ + Note: In the above classpaths, you can replace axis2/tuscany-axis2-incubating-M1.jar with celtix/tuscany-celtix-incubating-M1.jar to use Celtix as the underlying webservices implementation. + +

Results

+

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

+

Code Overview

+The source files are physically organized as shown below:
+ + + +
src
+---main
+---java
¦ +---helloworld
¦ HelloWorldClient.java
¦ HelloWorldService.java
¦
+---resources
¦ logging.properties
¦ sca.module
¦
+---wsdl
helloworld.wsdl




+
+ + + + + + + +
sca.moduleDefines the SCA module, +externalService and component. Defines for the +HelloWorldServiceComponent component and the Java class that implements +the component For the externalService it defines WSDL for the service, +the Java interface provided by the service. +The the HelloWorldServiceComponent is via a +referenced wired to the externalService
HelloWorldClient.javaCreates a Tuscany runtime and starts it.  Obtains +the module context which was defined by the sca.module file. From the +module context locates the HelloWorldService entryPoint and then +calls  the getGreetings method to invoke the web service defined in the helloword.wsdl.
HelloWorldService.javaDefines the Java interface +implemented by the component.
helloworld.wsdlWSDL for the service.
\ No newline at end of file -- cgit v1.2.3