The Tuscany helloworld sample shows using the Tuscany SCA runtime in a J2SE environment loading a JavaScript component that implements the classic introductory hello world example.
The sample when run should simply display to the standard
output:
jsHello World
sca.module
org
+-apache
+-tuscany
+-samples
+-helloworldjs
HelloWorldClient.java
HelloWorldService.java
HelloWorldServiceComponentImpl.js
HelloWorldServiceComponentImpl.componentType
sca.module | Defines the SCA module and component. Defines for the HelloWorldServiceComponent component the Java class that implements that component |
HelloWorldService.java | Defines the Java interface implemented by the component. |
HelloWorldServiceComponentImpl.js | JavaScript implementation of the SCA component. |
HelloWorldServiceComponentImpl.componentType | The SCA componentType side file defining the service interface implemented by the JavaScript component. |
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 HelloWorldServiceComponent and then calls the getGreetings method to invoke the component. |