diff options
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); |