Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7840A18484 for ; Thu, 18 Jun 2015 13:12:57 +0000 (UTC) Received: (qmail 52778 invoked by uid 500); 18 Jun 2015 13:12:57 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 52706 invoked by uid 500); 18 Jun 2015 13:12:57 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 52690 invoked by uid 99); 18 Jun 2015 13:12:57 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2015 13:12:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 66C90E35CE; Thu, 18 Jun 2015 13:12:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Thu, 18 Jun 2015 13:12:56 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cxf git commit: Adding tests for derived Symmetric attachments Repository: cxf Updated Branches: refs/heads/master b4aa01a0d -> 59c97b4e1 Adding tests for derived Symmetric attachments Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/59c97b4e Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/59c97b4e Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/59c97b4e Branch: refs/heads/master Commit: 59c97b4e1c6a5eb6d0447fad62c7efbb3371fe00 Parents: e9e4d0b Author: Colm O hEigeartaigh Authored: Thu Jun 18 14:11:48 2015 +0100 Committer: Colm O hEigeartaigh Committed: Thu Jun 18 14:12:37 2015 +0100 ---------------------------------------------------------------------- .../cxf/systest/ws/swa/SWAPolicyTest.java | 59 ++++++++ .../apache/cxf/systest/ws/swa/DoubleItSwa.wsdl | 134 ++++++++++++++++++- .../apache/cxf/systest/ws/swa/policy-client.xml | 17 +++ .../apache/cxf/systest/ws/swa/policy-server.xml | 24 ++++ .../cxf/systest/ws/swa/stax-policy-server.xml | 26 ++++ 5 files changed, 259 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/59c97b4e/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/swa/SWAPolicyTest.java ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/swa/SWAPolicyTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/swa/SWAPolicyTest.java index 64a3fd1..a76f002 100644 --- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/swa/SWAPolicyTest.java +++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/swa/SWAPolicyTest.java @@ -205,6 +205,35 @@ public class SWAPolicyTest extends AbstractBusClientServerTestBase { } @org.junit.Test + public void testSWACombinedDerivedPolicy() throws Exception { + + SpringBusFactory bf = new SpringBusFactory(); + URL busFile = SWAPolicyTest.class.getResource("policy-client.xml"); + + Bus bus = bf.createBus(busFile.toString()); + SpringBusFactory.setDefaultBus(bus); + SpringBusFactory.setThreadDefaultBus(bus); + + URL wsdl = SWAPolicyTest.class.getResource("DoubleItSwa.wsdl"); + Service service = Service.create(wsdl, SERVICE_QNAME); + QName portQName = new QName(NAMESPACE, "DoubleItSWACombinedDerivedPolicyPort"); + DoubleItSwaPortType port = + service.getPort(portQName, DoubleItSwaPortType.class); + updateAddressPort(port, test.getPort()); + + if (test.isStreaming()) { + enableStreaming(port); + } + + DoubleIt3 doubleIt = new DoubleIt3(); + doubleIt.setNumberToDouble(25); + port.doubleIt3(doubleIt, "12345".getBytes()); + + ((java.io.Closeable)port).close(); + bus.shutdown(true); + } + + @org.junit.Test public void testSWACombinedAsymmetricPolicy() throws Exception { SpringBusFactory bf = new SpringBusFactory(); @@ -233,6 +262,36 @@ public class SWAPolicyTest extends AbstractBusClientServerTestBase { bus.shutdown(true); } + @org.junit.Test + @org.junit.Ignore + public void testSWACombinedAsymmetricDerivedPolicy() throws Exception { + + SpringBusFactory bf = new SpringBusFactory(); + URL busFile = SWAPolicyTest.class.getResource("policy-client.xml"); + + Bus bus = bf.createBus(busFile.toString()); + SpringBusFactory.setDefaultBus(bus); + SpringBusFactory.setThreadDefaultBus(bus); + + URL wsdl = SWAPolicyTest.class.getResource("DoubleItSwa.wsdl"); + Service service = Service.create(wsdl, SERVICE_QNAME); + QName portQName = new QName(NAMESPACE, "DoubleItSWACombinedAsymmetricDerivedPolicyPort"); + DoubleItSwaPortType port = + service.getPort(portQName, DoubleItSwaPortType.class); + updateAddressPort(port, test.getPort()); + + if (test.isStreaming()) { + enableStreaming(port); + } + + DoubleIt3 doubleIt = new DoubleIt3(); + doubleIt.setNumberToDouble(25); + port.doubleIt3(doubleIt, "12345".getBytes()); + + ((java.io.Closeable)port).close(); + bus.shutdown(true); + } + static void enableStreaming(DoubleItSwaPortType port) { ((BindingProvider)port).getRequestContext().put( SecurityConstants.ENABLE_STREAMING_SECURITY, "true" http://git-wip-us.apache.org/repos/asf/cxf/blob/59c97b4e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl index 78d58e4..b37b162 100644 --- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl +++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/DoubleItSwa.wsdl @@ -141,7 +141,32 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -166,6 +191,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -192,9 +242,15 @@ + + + + + + @@ -229,6 +285,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -270,6 +359,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/59c97b4e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml index 138ac61..f064390 100644 --- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml +++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-client.xml @@ -53,6 +53,13 @@ + + + + + + + @@ -63,4 +70,14 @@ + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/59c97b4e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml index f01226f..a264ffd 100644 --- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml +++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/policy-server.xml @@ -70,6 +70,17 @@ + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/59c97b4e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml index 496d0fc..6f5d94f 100644 --- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml +++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/swa/stax-policy-server.xml @@ -74,6 +74,18 @@ + + + + + + + + + + + + + + + + + +