cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1503183 - in /cxf/trunk: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
Date Mon, 15 Jul 2013 11:29:32 GMT
Author: coheigea
Date: Mon Jul 15 11:29:32 2013
New Revision: 1503183

URL: http://svn.apache.org/r1503183
Log:
Enabled more tests

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java?rev=1503183&r1=1503182&r2=1503183&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractStaxBindingHandler.java
Mon Jul 15 11:29:32 2013
@@ -915,7 +915,11 @@ public abstract class AbstractStaxBindin
                 signedParts.add(securePart);
             }
             for (Header head : parts.getHeaders()) {
-                QName qname = new QName(head.getNamespace(), head.getName());
+                String localName = head.getName();
+                if (localName == null) {
+                    localName = "*";
+                }
+                QName qname = new QName(head.getNamespace(), localName);
                 SecurePart securePart = new SecurePart(qname, Modifier.Element);
                 securePart.setRequired(false);
                 signedParts.add(securePart);
@@ -968,7 +972,11 @@ public abstract class AbstractStaxBindin
                 encryptedParts.add(securePart);
             }
             for (Header head : parts.getHeaders()) {
-                QName qname = new QName(head.getNamespace(), head.getName());
+                String localName = head.getName();
+                if (localName == null) {
+                    localName = "*";
+                }
+                QName qname = new QName(head.getNamespace(), localName);
                 SecurePart securePart = new SecurePart(qname, Modifier.Element);
                 securePart.setRequired(false);
                 encryptedParts.add(securePart);

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java?rev=1503183&r1=1503182&r2=1503183&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
Mon Jul 15 11:29:32 2013
@@ -228,6 +228,7 @@ public class SecurityPolicyTest extends 
 
         QName portQName = new QName(NAMESPACE, "DoubleItPortXPath");
         pt = service.getPort(portQName, DoubleItPortType.class);
+        
         updateAddressPort(pt, PORT);
         ((BindingProvider)pt).getRequestContext().put(SecurityConstants.CALLBACK_HANDLER,

                                                       new KeystorePasswordCallback());
@@ -266,6 +267,11 @@ public class SecurityPolicyTest extends 
                                                       getClass().getResource("alice.properties"));
         ((BindingProvider)pt).getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES,

                                                       getClass().getResource("bob.properties"));
+        // DOM
+        pt.doubleIt(5);
+        
+        // Streaming
+        SecurityTestUtil.enableStreaming(pt);
         pt.doubleIt(5);
         
         ((java.io.Closeable)pt).close();
@@ -285,7 +291,7 @@ public class SecurityPolicyTest extends 
         
         // Streaming
         SecurityTestUtil.enableStreaming(pt);
-        // pt.doubleIt(5);
+        pt.doubleIt(5);
         
         ((java.io.Closeable)pt).close();
         



Mime
View raw message