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 2014/02/21 12:34:56 UTC
[1/2] git commit: Re-enabling test
Repository: cxf
Updated Branches:
refs/heads/master 7705a925f -> 60ced92f7
Re-enabling test
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2b3bb5e4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2b3bb5e4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2b3bb5e4
Branch: refs/heads/master
Commit: 2b3bb5e434082422a1631a434b3bd346c0ae766c
Parents: 7705a92
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Feb 21 11:22:20 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Feb 21 11:22:20 2014 +0000
----------------------------------------------------------------------
.../apache/cxf/systest/ws/x509/X509TokenTest.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/2b3bb5e4/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
index 8e95e63..633116c 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
@@ -128,15 +128,15 @@ public class X509TokenTest extends AbstractBusClientServerTestBase {
SecurityTestUtil.enableStreaming(x509Port);
}
- // TODO Wait until we pick up WSS4J 2.0.0-SNAPSHOT again
- if (PORT.equals(test.getPort())) {
- try {
- x509Port.doubleIt(25);
- fail("Failure expected on an incorrect key");
- } catch (javax.xml.ws.soap.SOAPFaultException ex) {
- String error = "No certificates were found for decryption";
- assertTrue(ex.getMessage().contains(error));
+ try {
+ x509Port.doubleIt(25);
+ fail("Failure expected on an incorrect key");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ String error = "No certificates were found for decryption";
+ if (STAX_PORT.equals(test.getPort())) {
+ error = "Referenced security token could not be retrieved";
}
+ assertTrue(ex.getMessage().contains(error));
}
((java.io.Closeable)x509Port).close();
[2/2] git commit: Adding a testcase for CXF-5567
Posted by co...@apache.org.
Adding a testcase for CXF-5567
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/60ced92f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/60ced92f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/60ced92f
Branch: refs/heads/master
Commit: 60ced92f740f2f88dd75457e22e8775de88d1a09
Parents: 2b3bb5e
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Feb 21 11:34:32 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Feb 21 11:34:32 2014 +0000
----------------------------------------------------------------------
.../sts/symmetric/SymmetricBindingTest.java | 43 ++++++++++++++++++++
1 file changed, 43 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/60ced92f/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
index 5f390ac..b478361 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
@@ -285,6 +285,49 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
bus.shutdown(true);
}
+ // TODO See CXF-5567
+ @org.junit.Test
+ @org.junit.Ignore
+ public void testUsernameTokenSAML1Dispatch() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML1Port");
+
+ Dispatch<DOMSource> dispatch =
+ service.createDispatch(portQName, DOMSource.class, Service.Mode.PAYLOAD);
+ updateAddressPort(dispatch, test.getPort());
+
+ // Setup STSClient
+ STSClient stsClient = createDispatchSTSClient(bus);
+ String wsdlLocation = "http://localhost:" + test.getStsPort() + "/SecurityTokenService/UT?wsdl";
+ stsClient.setWsdlLocation(wsdlLocation);
+
+ // Creating a DOMSource Object for the request
+ DOMSource request = createDOMRequest();
+
+ // Make a successful request
+ Client client = ((DispatchImpl<DOMSource>) dispatch).getClient();
+ client.getRequestContext().put("ws-security.sts.client", stsClient);
+
+ if (test.isStreaming()) {
+ client.getRequestContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
+ client.getResponseContext().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true");
+ }
+
+ DOMSource response = dispatch.invoke(request);
+ assertNotNull(response);
+
+ bus.shutdown(true);
+ }
+
private DOMSource createDOMRequest() throws ParserConfigurationException {
// Creating a DOMSource Object for the request
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();