summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java8
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java2
3 files changed, 3 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
index c72d41c851..8c3284eb84 100644
--- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
+++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/helloworld/HelloWorldService.java
@@ -31,13 +31,7 @@ public class HelloWorldService implements HelloWorld {
public String getGreetings(String name) {
Subject subject = requestContext.getSecuritySubject();
- String response = "Hello " + name + " ";
-
- if (subject == null){
- response += "null subject";
- } else {
- response += subject.getPrincipals().iterator().next().getName();
- }
+ String response = "Hello " + name;
System.out.println("At service: " + response);
return response;
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
index be0c0a9eb6..ea6b31c5cb 100644
--- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
+++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/main/java/testpolicy/TestPolicyInterceptor.java
@@ -77,7 +77,7 @@ public class TestPolicyInterceptor implements PhasedInterceptor {
public Message invoke(Message msg) {
System.out.println("In interceptor");
- return msg;
+ return getNext().invoke(msg);
}
public Invoker getNext() {
diff --git a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
index c2b2e7efba..208ffd0703 100644
--- a/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/policy/interceptors/src/test/java/interceptors/HelloworldTestCase.java
@@ -40,7 +40,7 @@ public class HelloworldTestCase extends TestCase {
}
public void testCalculator() throws Exception {
- assertEquals("Hello fred myname", helloWorld.getGreetings("fred"));
+ assertEquals("Hello fred", helloWorld.getGreetings("fred"));
}
@Override