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 37E1A102D5 for ; Fri, 25 Oct 2013 14:13:52 +0000 (UTC) Received: (qmail 6872 invoked by uid 500); 25 Oct 2013 14:13:49 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 6770 invoked by uid 500); 25 Oct 2013 14:13:46 -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 6746 invoked by uid 99); 25 Oct 2013 14:13:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 14:13:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Oct 2013 14:13:42 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7E411238889B; Fri, 25 Oct 2013 14:13:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1535746 - in /cxf/trunk/systests/ws-security/src/test: java/org/apache/cxf/systest/ws/wssc/ resources/org/apache/cxf/systest/ws/wssc/ Date: Fri, 25 Oct 2013 14:13:22 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131025141322.7E411238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Fri Oct 25 14:13:21 2013 New Revision: 1535746 URL: http://svn.apache.org/r1535746 Log: Adding more SecureConversation tests Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/DoubleItWSSC.wsdl cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/client.xml cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/unit-server.xml Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java?rev=1535746&r1=1535745&r2=1535746&view=diff ============================================================================== --- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java (original) +++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java Fri Oct 25 14:13:21 2013 @@ -104,6 +104,52 @@ public class WSSCUnitTest extends Abstra ((java.io.Closeable)port).close(); } + + @Test + public void testEndorsingSecureConverationDOMSP12() throws Exception { + + SpringBusFactory bf = new SpringBusFactory(); + URL busFile = WSSCUnitTest.class.getResource("client.xml"); + + Bus bus = bf.createBus(busFile.toString()); + SpringBusFactory.setDefaultBus(bus); + SpringBusFactory.setThreadDefaultBus(bus); + + URL wsdl = WSSCUnitTest.class.getResource("DoubleItWSSC.wsdl"); + Service service = Service.create(wsdl, SERVICE_QNAME); + QName portQName = new QName(NAMESPACE, "DoubleItTransportSP12Port"); + DoubleItPortType port = + service.getPort(portQName, DoubleItPortType.class); + updateAddressPort(port, PORT); + + port.doubleIt(25); + + ((java.io.Closeable)port).close(); + } + + @Test + public void testEndorsingSecureConverationStreamingSP12() throws Exception { + + SpringBusFactory bf = new SpringBusFactory(); + URL busFile = WSSCUnitTest.class.getResource("client.xml"); + + Bus bus = bf.createBus(busFile.toString()); + SpringBusFactory.setDefaultBus(bus); + SpringBusFactory.setThreadDefaultBus(bus); + + URL wsdl = WSSCUnitTest.class.getResource("DoubleItWSSC.wsdl"); + Service service = Service.create(wsdl, SERVICE_QNAME); + QName portQName = new QName(NAMESPACE, "DoubleItTransportSP12Port"); + DoubleItPortType port = + service.getPort(portQName, DoubleItPortType.class); + updateAddressPort(port, PORT); + + // Streaming + SecurityTestUtil.enableStreaming(port); + port.doubleIt(30); + + ((java.io.Closeable)port).close(); + } } Modified: cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/DoubleItWSSC.wsdl URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/DoubleItWSSC.wsdl?rev=1535746&r1=1535745&r2=1535746&view=diff ============================================================================== --- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/DoubleItWSSC.wsdl (original) +++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/DoubleItWSSC.wsdl Fri Oct 25 14:13:21 2013 @@ -23,9 +23,7 @@ targetNamespace="http://www.example.org/contract/DoubleIt" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" - xmlns:wsaws="http://www.w3.org/2005/08/addressing" - xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" - xmlns:sp13="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802"> + xmlns:wsaws="http://www.w3.org/2005/08/addressing"> @@ -50,13 +48,37 @@ + + + + + + + + + + + + + + + + + + + + + + - + @@ -134,8 +156,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -147,7 +248,7 @@ - + Modified: cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/client.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/client.xml?rev=1535746&r1=1535745&r2=1535746&view=diff ============================================================================== --- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/client.xml (original) +++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/client.xml Fri Oct 25 14:13:21 2013 @@ -39,14 +39,6 @@ - - - - - - - Modified: cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/unit-server.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/unit-server.xml?rev=1535746&r1=1535745&r2=1535746&view=diff ============================================================================== --- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/unit-server.xml (original) +++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/wssc/unit-server.xml Fri Oct 25 14:13:21 2013 @@ -79,4 +79,20 @@ + + + + + + + +