The Tuscany Hello World JMS client sample shows using the Tuscany SCA runtime in a J2SE environment invoking a service using XML over JMS.
Linux: java -cp ../../../../lib/tuscany-runtime-incubating-M1.jar:../../../../lib/celtix/tuscany-celtix-incubating-M1.jar:target/sample-helloworldjms-client-incubating-M1.jar helloworld.HelloWorldClient
Windows: java -cp ../../../../lib/tuscany-runtime-incubating-M1.jar;../../../../lib/celtix/tuscany-celtix-incubating-M1.jar;target/sample-helloworldjms-client-incubating-M1.jar helloworld.HelloWorldClient
The sample when run should simply display to the standard output:
Hello World
src +---main +---java ¦ +---helloworld ¦ HelloWorldClient.java ¦ HelloWorldService.java ¦ +---resources ¦ logging.properties ¦ sca.module ¦ +---wsdl helloworld.wsdl |
sca.module | Defines 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.java | Creates 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.java | Defines the Java interface implemented by the component. |
helloworld.wsdl | WSDL for the service. Not that the WSDL defines a XML binding using a JMS transport intead of the normal SOAP/HTTP |