From 4c2bb0cebb0caff68e32c2f32d9e4e1c0310b33e Mon Sep 17 00:00:00 2001 From: slaws Date: Tue, 20 Apr 2010 18:05:26 +0000 Subject: 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 --- .../java/org/apache/tuscany/sca/binding/ws/jaxws/HelloWorld.java | 2 ++ .../org/apache/tuscany/sca/binding/ws/jaxws/HelloWorldImpl.java | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'sca-java-2.x/trunk/itest/ws-jaxws/contribution-java-first/src/main') 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); -- cgit v1.2.3