diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-20 18:05:26 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-04-20 18:05:26 +0000 |
commit | 4c2bb0cebb0caff68e32c2f32d9e4e1c0310b33e (patch) | |
tree | 0217eebf7a156409f84a220b817c89e6c3830ef2 /sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main | |
parent | f6ff505e5bbfe699127f5c468562b4609b8c0f41 (diff) |
Add exceptions to the test and make the launchers a bit more generic
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@936018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main')
2 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java b/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java index 32f86ee30f..652f7b53c4 100644 --- a/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java +++ b/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java @@ -19,11 +19,13 @@ package org.apache.tuscany.sca.binding.ws.jaxws; +import org.oasisopen.sca.ServiceRuntimeException; import org.oasisopen.sca.annotation.Remotable; @Remotable public interface HelloWorld { String getGreetings(String s); + String getGreetingsException(String s) throws ServiceRuntimeException; Foo getGreetingsComplex(Foo foo); } diff --git a/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java b/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java index e2c6ba4b65..85e55888c6 100644 --- a/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java +++ b/sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java @@ -22,6 +22,7 @@ package org.apache.tuscany.sca.binding.ws.jaxws; import javax.jws.WebService; import org.apache.tuscany.sca.binding.ws.jaxws.external.service.jaxws.HelloWorldService; +import org.oasisopen.sca.ServiceRuntimeException; import org.oasisopen.sca.annotation.Reference; @WebService @@ -36,6 +37,13 @@ public class HelloWorldImpl implements HelloWorld { System.out.println("Leaving SCA HelloWorld.getGreetings: " + response); return response; } + + public String getGreetingsException(String s) throws ServiceRuntimeException { + System.out.println("Entering SCA HelloWorld.getGreetingsException: " + s); + String response = helloWorldExternal.getGreetings(s); + System.out.println("Leaving SCA HelloWorld.getGreetings: " + response); + throw new ServiceRuntimeException(response); + } public Foo getGreetingsComplex(Foo foo){ Foo response = null;//helloWorldExternal.getGreetingsComplex(foo); |