diff options
Diffstat (limited to 'sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample')
3 files changed, 70 insertions, 0 deletions
diff --git a/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/Location.java b/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/Location.java new file mode 100644 index 0000000000..1a47edf73c --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta1/unreleased/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/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/ShareService.java b/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/ShareService.java new file mode 100644 index 0000000000..3c79c6c2e9 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta1/unreleased/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/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java b/sca-java-2.x/branches/2.0-Beta1/unreleased/samples/jsonp-webapp/src/main/java/sample/ShareServiceImpl.java new file mode 100644 index 0000000000..13bae36eb9 --- /dev/null +++ b/sca-java-2.x/branches/2.0-Beta1/unreleased/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; + } + +} |