summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java')
-rw-r--r--branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java7
-rw-r--r--branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java1
-rw-r--r--branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java6
3 files changed, 14 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
index d6545b5a23..c86059f4f5 100644
--- a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
+++ b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleClientImpl.java
@@ -40,5 +40,12 @@ public class ExampleClientImpl implements ExampleClient {
} catch (BusinessException e) {
System.out.println("caught exception from hello(): " + e.getMessage() + " for " + e.getClientName());
}
+
+ try {
+ Object result = myService.helloUnchecked("John");
+ System.out.println("myService returned " + result.getClass().getName());
+ } catch (Exception e) {
+ System.out.println("caught exception from helloUnchecked(): " + e.getMessage());
+ }
}
}
diff --git a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
index 30ea559694..4f82e10241 100644
--- a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
+++ b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleService.java
@@ -24,4 +24,5 @@ import org.osoa.sca.annotations.Remotable;
public interface ExampleService {
String hello(String name) throws BusinessException;
+ String helloUnchecked(String name);
}
diff --git a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
index b3b6f033e5..5d054c1c9b 100644
--- a/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
+++ b/branches/sca-java-1.x/itest/exceptions-simple-ws/src/main/java/com/example/ExampleServiceImpl.java
@@ -18,9 +18,15 @@
*/
package com.example;
+import org.osoa.sca.ServiceRuntimeException;
+
public class ExampleServiceImpl implements ExampleService {
public String hello(String name) throws BusinessException {
throw new BusinessException("bad news", name);
// return "Hello, " + name;
}
+
+ public String helloUnchecked(String name){
+ throw new ServiceRuntimeException("bad unchecked news");
+ }
}