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/07/31 10:24:34 UTC
svn commit: r1508768 -
/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java
Author: coheigea
Date: Wed Jul 31 08:24:34 2013
New Revision: 1508768
URL: http://svn.apache.org/r1508768
Log:
Re-enabling a test following a fix for WSS-470
Modified:
cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java
Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java?rev=1508768&r1=1508767&r2=1508768&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java (original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/StaxBindingPropertiesTest.java Wed Jul 31 08:24:34 2013
@@ -494,9 +494,7 @@ public class StaxBindingPropertiesTest e
bus.shutdown(true);
}
- // TODO - See WSS-470
@org.junit.Test
- @org.junit.Ignore
public void testTokenProtection() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
@@ -513,6 +511,12 @@ public class StaxBindingPropertiesTest e
QName portQName = new QName(NAMESPACE, "DoubleItTokenProtectionPort");
DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(port, PORT);
+
+ // DOM
+ port.doubleIt(25);
+
+ // Streaming
+ SecurityTestUtil.enableStreaming(port);
port.doubleIt(25);
// This should fail, as the property is not enabled
@@ -520,13 +524,22 @@ public class StaxBindingPropertiesTest e
port = service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(port, PORT);
+ // DOM
+ try {
+ port.doubleIt(25);
+ fail("Failure expected on not protecting the token");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ String error = "BinarySecurityToken must be signed by its signature";
+ assertTrue(ex.getMessage().contains(error));
+ }
+
+ // Streaming
try {
port.doubleIt(25);
fail("Failure expected on not protecting the token");
} catch (javax.xml.ws.soap.SOAPFaultException ex) {
- // String error = "Layout does not match the requirements";
+ // String error = "BinarySecurityToken must be signed by its signature";
// assertTrue(ex.getMessage().contains(error));
- System.out.println("EX: " + ex.getMessage());
}
((java.io.Closeable)port).close();