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 6081F10565 for ; Tue, 15 Oct 2013 10:17:25 +0000 (UTC) Received: (qmail 15425 invoked by uid 500); 15 Oct 2013 10:17:21 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 15314 invoked by uid 500); 15 Oct 2013 10:17:19 -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 15305 invoked by uid 99); 15 Oct 2013 10:17:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2013 10:17:17 +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; Tue, 15 Oct 2013 10:17:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B22EC238889B; Tue, 15 Oct 2013 10:16:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1532274 - in /cxf/branches/2.7.x-fixes: rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/ systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/ systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x5... Date: Tue, 15 Oct 2013 10:16:55 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131015101655.B22EC238889B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Tue Oct 15 10:16:55 2013 New Revision: 1532274 URL: http://svn.apache.org/r1532274 Log: [CXF-5335] - Incorrect handle of ws-policy 1.1 (Incorrect inclusion value: null) Conflicts: systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/StaxX509TokenTest.java systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/stax-server.xml Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SP11Constants.java cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/server/server.xml Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SP11Constants.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SP11Constants.java?rev=1532274&r1=1532273&r2=1532274&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SP11Constants.java (original) +++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SP11Constants.java Tue Oct 15 10:16:55 2013 @@ -43,6 +43,9 @@ public final class SP11Constants extends public static final String INCLUDE_ALWAYS_TO_RECIPIENT = SP11Constants.SP_NS + SPConstants.INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT_SUFFIX; + + public static final String INCLUDE_ALWAYS_TO_INITIATOR = SP11Constants.SP_NS + + SPConstants.INCLUDE_TOKEN_ALWAYS_TO_INITIATOR_SUFFIX; public static final String INCLUDE_ALWAYS = SP11Constants.SP_NS + SPConstants.INCLUDE_TOKEN_ALWAYS_SUFFIX; @@ -301,6 +304,8 @@ public final class SP11Constants extends return IncludeTokenType.INCLUDE_TOKEN_ALWAYS; } else if (INCLUDE_ALWAYS_TO_RECIPIENT.equals(value)) { return IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT; + } else if (INCLUDE_ALWAYS_TO_INITIATOR.equals(value)) { + return IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_INITIATOR; } else if (INCLUDE_NEVER.equals(value)) { return IncludeTokenType.INCLUDE_TOKEN_NEVER; } else if (INCLUDE_ONCE.equals(value)) { @@ -316,6 +321,8 @@ public final class SP11Constants extends return SP11Constants.INCLUDE_ALWAYS; case INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT: return SP11Constants.INCLUDE_ALWAYS_TO_RECIPIENT; + case INCLUDE_TOKEN_ALWAYS_TO_INITIATOR: + return SP11Constants.INCLUDE_ALWAYS_TO_INITIATOR; case INCLUDE_TOKEN_NEVER: return SP11Constants.INCLUDE_NEVER; case INCLUDE_TOKEN_ONCE: Modified: cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java?rev=1532274&r1=1532273&r2=1532274&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java (original) +++ cxf/branches/2.7.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java Tue Oct 15 10:16:55 2013 @@ -230,6 +230,30 @@ public class X509TokenTest extends Abstr DoubleItPortType x509Port = service.getPort(portQName, DoubleItPortType.class); updateAddressPort(x509Port, PORT); + + x509Port.doubleIt(25); + + ((java.io.Closeable)x509Port).close(); + bus.shutdown(true); + } + + @org.junit.Test + public void testAsymmetricSP11() throws Exception { + + SpringBusFactory bf = new SpringBusFactory(); + URL busFile = X509TokenTest.class.getResource("client/client.xml"); + + Bus bus = bf.createBus(busFile.toString()); + SpringBusFactory.setDefaultBus(bus); + SpringBusFactory.setThreadDefaultBus(bus); + + URL wsdl = X509TokenTest.class.getResource("DoubleItX509.wsdl"); + Service service = Service.create(wsdl, SERVICE_QNAME); + QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSP11Port"); + DoubleItPortType x509Port = + service.getPort(portQName, DoubleItPortType.class); + updateAddressPort(x509Port, PORT); + x509Port.doubleIt(25); ((java.io.Closeable)x509Port).close(); Modified: cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl?rev=1532274&r1=1532273&r2=1532274&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl (original) +++ cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItX509.wsdl Tue Oct 15 10:16:55 2013 @@ -125,6 +125,25 @@ + + + + + + + + + + + + + + + + + + + + + @@ -676,6 +699,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml?rev=1532274&r1=1532273&r2=1532274&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml (original) +++ cxf/branches/2.7.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/client/client.xml Tue Oct 15 10:16:55 2013 @@ -87,7 +87,21 @@ - + + + + + + + + + + + + + + + + + + + + +