You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2013/04/26 11:30:02 UTC

svn commit: r1476120 - in /cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j: StaxRoundTripActionTest.java StaxRoundTripTest.java StaxToDOMRoundTripTest.java

Author: coheigea
Date: Fri Apr 26 09:30:02 2013
New Revision: 1476120

URL: http://svn.apache.org/r1476120
Log:
Some minor fixes

Modified:
    cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
    cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
    cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java

Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java?rev=1476120&r1=1476119&r2=1476120&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripActionTest.java Fri Apr 26 09:30:02 2013
@@ -299,7 +299,7 @@ public class StaxRoundTripActionTest ext
         
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(
-            new XMLSecurityConstants.Action[]{WSSConstants.SIGNATURE, WSSConstants.TIMESTAMP}
+            new XMLSecurityConstants.Action[]{WSSConstants.TIMESTAMP, WSSConstants.SIGNATURE}
         );
         properties.addSignaturePart(
             new SecurePart(new QName(WSSConstants.NS_WSU10, "Timestamp"), SecurePart.Modifier.Element)

Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java?rev=1476120&r1=1476119&r2=1476120&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxRoundTripTest.java Fri Apr 26 09:30:02 2013
@@ -228,10 +228,10 @@ public class StaxRoundTripTest extends A
             CryptoFactory.getProperties("insecurity.properties", this.getClass().getClassLoader());
         inProperties.setSignatureVerificationCryptoProperties(cryptoProperties);
         WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inProperties);
-        WSS4JPrincipalInterceptor principalInterceptor = new WSS4JPrincipalInterceptor();
-        principalInterceptor.setPrincipalName("username");
+        //WSS4JPrincipalInterceptor principalInterceptor = new WSS4JPrincipalInterceptor();
+        //principalInterceptor.setPrincipalName("username");
         service.getInInterceptors().add(inhandler);
-        service.getInInterceptors().add(principalInterceptor);
+        //service.getInInterceptors().add(principalInterceptor);
         
         // Create + configure client
         Echo echo = createClientProxy();
@@ -242,7 +242,7 @@ public class StaxRoundTripTest extends A
         
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[] {
-            WSSConstants.SIGNATURE, WSSConstants.USERNAMETOKEN
+            WSSConstants.USERNAMETOKEN, WSSConstants.SIGNATURE
         });
         properties.setSignatureUser("myalias");
         

Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java?rev=1476120&r1=1476119&r2=1476120&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java (original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/StaxToDOMRoundTripTest.java Fri Apr 26 09:30:02 2013
@@ -314,7 +314,7 @@ public class StaxToDOMRoundTripTest exte
         
         WSSSecurityProperties properties = new WSSSecurityProperties();
         properties.setOutAction(new XMLSecurityConstants.Action[] {
-            WSSConstants.SIGNATURE, WSSConstants.USERNAMETOKEN
+            WSSConstants.USERNAMETOKEN, WSSConstants.SIGNATURE
         });
         properties.setSignatureUser("myalias");
         
@@ -421,9 +421,7 @@ public class StaxToDOMRoundTripTest exte
         assertEquals("test", echo.echo("test"));
     }
     
-    // TODO
     @Test
-    @org.junit.Ignore
     public void testSignatureTimestampWrongNamespace() throws Exception {
         // Create + configure service
         Service service = createService();
@@ -468,7 +466,7 @@ public class StaxToDOMRoundTripTest exte
             echo.echo("test");
             fail("Failure expected on a wrong namespace");
         } catch (javax.xml.ws.soap.SOAPFaultException ex) {
-            ex.printStackTrace();
+            // expected
         }
     }