From d123827b572d59f86e23d4e7fac42864d646ee60 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Tue, 7 Sep 2010 23:52:54 +0000 Subject: Sandbox to experiment with deployment and management commands. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@993560 13f79535-47bb-0310-9956-ffa450edef68 --- .../shell/contrib/samples/jsonp-webapp/pom.xml | 53 +++++++++++ .../src/main/java/sample/Location.java | 33 +++++++ .../src/main/java/sample/ShareService.java | 14 +++ .../src/main/java/sample/ShareServiceImpl.java | 23 +++++ .../src/main/webapp/META-INF/MANIFEST.MF | 2 + .../src/main/webapp/WEB-INF/web.composite | 33 +++++++ .../jsonp-webapp/src/main/webapp/WEB-INF/web.xml | 34 +++++++ .../jsonp-webapp/src/main/webapp/index.html | 104 +++++++++++++++++++++ 8 files changed, 296 insertions(+) create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/pom.xml create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/Location.java create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareService.java create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/META-INF/MANIFEST.MF create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.composite create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/index.html (limited to 'sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp') diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/pom.xml b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/pom.xml new file mode 100644 index 0000000000..8254ce61a5 --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../../pom.xml + + + org.apache.tuscany.sca + sample-jsonp-webapp + war + 1.0 + jsonp-webapp + + + + org.apache.tuscany.sca.shades + tuscany-base-nodep + 2.0-SNAPSHOT + + + org.apache.tuscany.sca + tuscany-binding-jsonp-runtime + 2.0-SNAPSHOT + jar + + + + + jsonp-webapp + + + diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/Location.java b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/Location.java new file mode 100644 index 0000000000..1a47edf73c --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/Location.java @@ -0,0 +1,33 @@ +package sample; + +public class Location { + + private String city; + private String country; + private int altitude; + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public int getAltitude() { + return altitude; + } + + public void setAltitude(int altitude) { + this.altitude = altitude; + } + +} diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareService.java b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareService.java new file mode 100644 index 0000000000..3c79c6c2e9 --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareService.java @@ -0,0 +1,14 @@ +package sample; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface ShareService { + + String shareName(String firstName, String lastName); + + int shareAge(int age); + + Location shareLocation(Location location); + +} diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java new file mode 100644 index 0000000000..13bae36eb9 --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java @@ -0,0 +1,23 @@ +package sample; + +import org.oasisopen.sca.annotation.Service; + +@Service(ShareService.class) +public class ShareServiceImpl implements ShareService { + + @Override + public String shareName(String firstName, String lastName) { + return firstName + " " + lastName; + } + + @Override + public int shareAge(int age) { + return age; + } + + @Override + public Location shareLocation(Location location) { + return location; + } + +} diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/META-INF/MANIFEST.MF b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..58630c02ef --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.composite b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..515c2dba09 --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.xml b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..0deec29fcc --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,34 @@ + + + + Apache Tuscany JSONP Sample + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + true + + + tuscany + /* + + + index.html + + \ No newline at end of file diff --git a/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/index.html b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/index.html new file mode 100644 index 0000000000..2a754e494e --- /dev/null +++ b/sandbox/sebastien/java/shell/contrib/samples/jsonp-webapp/src/main/webapp/index.html @@ -0,0 +1,104 @@ + + + + Apache Tuscany Comet Sample + + + + + +

Apache Tuscany JSONP Sample

+

Share Personal Information Webapp

+ +
+ + + + + + + + +
First Name +
Last Name +
+ + +
+ +
+ + + + + +
Age +
+ + +
+ +
+ + + + + + + + + + + +
City +
Country +
Altitude +
+ +
+ + -- cgit v1.2.3