Repository: cxf Updated Branches: refs/heads/master a494f3f4c -> 0e2647c07
adding another test case for wsam-2007/05 namespace Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0e2647c0 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0e2647c0 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0e2647c0 Branch: refs/heads/master Commit: 0e2647c078b2ee427979cb76abb63afe3fe4f939 Parents: a494f3f Author: Akitoshi Yoshida <a...@apache.org> Authored: Tue Jan 19 13:28:55 2016 +0100 Committer: Akitoshi Yoshida <a...@apache.org> Committed: Tue Jan 19 13:35:12 2016 +0100 ---------------------------------------------------------------------- .../ws/policy/NestedAddressingPolicyTest.java | 33 +++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/0e2647c0/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java ---------------------------------------------------------------------- diff --git a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java index dd6e63e..8890e07 100644 --- a/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java +++ b/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/NestedAddressingPolicyTest.java @@ -33,6 +33,8 @@ import org.apache.cxf.interceptor.LoggingInInterceptor; import org.apache.cxf.interceptor.LoggingOutInterceptor; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.cxf.testutil.common.AbstractBusTestServerBase; +import org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl; +import org.apache.cxf.ws.addressing.soap.MAPCodec; import org.junit.BeforeClass; import org.junit.Test; @@ -82,7 +84,7 @@ public class NestedAddressingPolicyTest extends AbstractBusClientServerTestBase } @Test - public void greetMe() throws Exception { + public void greetMe() throws Exception { // use a plain client @@ -110,4 +112,33 @@ public class NestedAddressingPolicyTest extends AbstractBusClientServerTestBase } ((Closeable)greeter).close(); } + + @Test + public void greetMeWSA() throws Exception { + // use a wsa-enabled client + + SpringBusFactory bf = new SpringBusFactory(); + bus = bf.createBus(); + BusFactory.setDefaultBus(bus); + + BasicGreeterService gs = new BasicGreeterService(); + final Greeter greeter = gs.getGreeterPort(); + + updateAddressPort(greeter, PORT); + LoggingInInterceptor in = new LoggingInInterceptor(); + LoggingOutInterceptor out = new LoggingOutInterceptor(); + MAPCodec mapCodec = new MAPCodec(); + MAPAggregatorImpl mapAggregator = new MAPAggregatorImpl(); + + bus.getInInterceptors().add(in); + bus.getInInterceptors().add(mapCodec); + bus.getInInterceptors().add(mapAggregator); + bus.getOutInterceptors().add(out); + bus.getOutInterceptors().add(mapCodec); + bus.getOutInterceptors().add(mapAggregator); + + String s = greeter.greetMe("mytest"); + assertEquals("MYTEST", s); + ((Closeable)greeter).close(); + } } \ No newline at end of file