From aecc194da9fb0d78403a49ed1f2b0a635c372b56 Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 13 Aug 2008 06:46:42 +0000 Subject: Add implementation.web client using jsonrpc git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@685464 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/samples/helloworld-web/pom.xml | 61 +++++++++++++++++++++ .../src/main/java/sample/HelloworldService.java | 7 +++ .../main/java/sample/HelloworldServiceImpl.java | 12 +++++ .../webapp/META-INF/sca-deployables/web.composite | 39 ++++++++++++++ .../helloworld-web/src/main/webapp/WEB-INF/web.xml | 42 +++++++++++++++ .../helloworld-web/src/main/webapp/hello.html | 62 ++++++++++++++++++++++ 6 files changed, 223 insertions(+) create mode 100644 java/sca/samples/helloworld-web/pom.xml create mode 100644 java/sca/samples/helloworld-web/src/main/java/sample/HelloworldService.java create mode 100644 java/sca/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java create mode 100644 java/sca/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite create mode 100644 java/sca/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml create mode 100644 java/sca/samples/helloworld-web/src/main/webapp/hello.html (limited to 'java/sca/samples') diff --git a/java/sca/samples/helloworld-web/pom.xml b/java/sca/samples/helloworld-web/pom.xml new file mode 100644 index 0000000000..f1e5401a27 --- /dev/null +++ b/java/sca/samples/helloworld-web/pom.xml @@ -0,0 +1,61 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.4-SNAPSHOT + ../../pom.xml + + sample-helloworld-web + war + Apache Tuscany SCA Helloworld Web Sample + + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.4-SNAPSHOT + compile + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + 1.4-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-jsonrpc-runtime + 1.4-SNAPSHOT + runtime + + + + + + ${artifactId} + + + diff --git a/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldService.java b/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldService.java new file mode 100644 index 0000000000..2b92fd4661 --- /dev/null +++ b/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldService.java @@ -0,0 +1,7 @@ +package sample; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java b/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java new file mode 100644 index 0000000000..be83d3b407 --- /dev/null +++ b/java/sca/samples/helloworld-web/src/main/java/sample/HelloworldServiceImpl.java @@ -0,0 +1,12 @@ +package sample; + +import org.osoa.sca.annotations.Service; + +@Service(HelloworldService.class) +public class HelloworldServiceImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/java/sca/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite b/java/sca/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite new file mode 100644 index 0000000000..20cebc2d53 --- /dev/null +++ b/java/sca/samples/helloworld-web/src/main/webapp/META-INF/sca-deployables/web.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/java/sca/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml b/java/sca/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..f29262a147 --- /dev/null +++ b/java/sca/samples/helloworld-web/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + + + + Apache Tuscany Helloworld Servlet Sample + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + + hello.html + + + diff --git a/java/sca/samples/helloworld-web/src/main/webapp/hello.html b/java/sca/samples/helloworld-web/src/main/webapp/hello.html new file mode 100644 index 0000000000..83ac0ae576 --- /dev/null +++ b/java/sca/samples/helloworld-web/src/main/webapp/hello.html @@ -0,0 +1,62 @@ + + + + + Apache Tuscany Helloworld Web Sample + + + + + + + +

Apache Tuscany Helloworld Web Sample

+ + + + + + + + + + + + +
Enter your name: + +
+ +
+
+
+ + + -- cgit v1.2.3