Repository: cxf Updated Branches: refs/heads/master ed18c008f -> ba2d7b85d
Fixing failing tests Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ba2d7b85 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ba2d7b85 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ba2d7b85 Branch: refs/heads/master Commit: ba2d7b85d44970cb4abd8cd18ac24178394ef404 Parents: 3506302 Author: Colm O hEigeartaigh <[email protected]> Authored: Mon Mar 23 15:44:32 2015 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Mon Mar 23 15:44:40 2015 +0000 ---------------------------------------------------------------------- .../apache/cxf/sts/operation/AbstractOperation.java | 4 ++-- .../org/apache/cxf/sts/request/RequestParser.java | 4 ++-- .../cxf/systest/sts/batch/SimpleBatchSTSClient.java | 6 +++--- .../cxf/systest/ws/fault/ModifiedRequestTest.java | 15 +++++++-------- 4 files changed, 14 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/ba2d7b85/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java ---------------------------------------------------------------------- diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java index 5e85234..40c8189 100644 --- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java +++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java @@ -78,13 +78,13 @@ import org.apache.cxf.ws.security.sts.provider.model.utility.AttributedDateTime; import org.apache.cxf.ws.security.tokenstore.TokenStore; import org.apache.wss4j.common.WSEncryptionPart; import org.apache.wss4j.common.ext.WSSecurityException; +import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.WSSecurityEngineResult; import org.apache.wss4j.dom.handler.WSHandlerConstants; import org.apache.wss4j.dom.handler.WSHandlerResult; import org.apache.wss4j.dom.message.WSSecEncrypt; import org.apache.wss4j.dom.message.WSSecEncryptedKey; -import org.apache.wss4j.dom.util.WSSecurityUtil; import org.apache.wss4j.dom.util.XmlSchemaDateFormat; import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants; import org.apache.xml.security.exceptions.XMLSecurityException; @@ -214,7 +214,7 @@ public abstract class AbstractOperation { } if (tokenReference.isUseKeyIdentifier()) { - String identifier = WSSecurityUtil.getIDFromReference(tokenReference.getIdentifier()); + String identifier = XMLUtils.getIDFromReference(tokenReference.getIdentifier()); KeyIdentifierType keyIdentifierType = QNameConstants.WSSE_FACTORY.createKeyIdentifierType(); http://git-wip-us.apache.org/repos/asf/cxf/blob/ba2d7b85/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java ---------------------------------------------------------------------- diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java index a1a2a26..2c4c9eb 100644 --- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java +++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/request/RequestParser.java @@ -76,6 +76,7 @@ import org.apache.cxf.ws.security.sts.provider.model.wstrust14.ActAsType; import org.apache.cxf.ws.security.sts.provider.model.xmldsig.KeyInfoType; import org.apache.cxf.ws.security.sts.provider.model.xmldsig.X509DataType; import org.apache.wss4j.common.ext.WSSecurityException; +import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.WSDocInfo; import org.apache.wss4j.dom.WSSConfig; @@ -85,7 +86,6 @@ import org.apache.wss4j.dom.handler.WSHandlerConstants; import org.apache.wss4j.dom.handler.WSHandlerResult; import org.apache.wss4j.dom.message.token.SecurityContextToken; import org.apache.wss4j.dom.processor.EncryptedKeyProcessor; -import org.apache.wss4j.dom.util.WSSecurityUtil; import org.apache.xml.security.utils.Constants; /** @@ -739,7 +739,7 @@ public class RequestParser { } // Find processed token corresponding to the URI - referenceURI = WSSecurityUtil.getIDFromReference(referenceURI); + referenceURI = XMLUtils.getIDFromReference(referenceURI); MessageContext messageContext = wsContext.getMessageContext(); final List<WSHandlerResult> handlerResults = http://git-wip-us.apache.org/repos/asf/cxf/blob/ba2d7b85/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java ---------------------------------------------------------------------- diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java index b21fb8e..5814bf7 100644 --- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java +++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/batch/SimpleBatchSTSClient.java @@ -42,7 +42,6 @@ import javax.xml.transform.dom.DOMSource; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; - import org.apache.cxf.Bus; import org.apache.cxf.BusException; import org.apache.cxf.binding.soap.SoapBindingConstants; @@ -95,6 +94,7 @@ import org.apache.wss4j.common.crypto.CryptoFactory; import org.apache.wss4j.common.crypto.CryptoType; import org.apache.wss4j.common.derivedKey.P_SHA1; import org.apache.wss4j.common.ext.WSSecurityException; +import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.WSDocInfo; import org.apache.wss4j.dom.WSSConfig; @@ -952,11 +952,11 @@ public class SimpleBatchSTSClient implements Configurable, InterceptorProvider { if (encryptionAlgorithm != null && encryptionAlgorithm.endsWith("spnego#GSS_Wrap")) { // Get the CipherValue Element tmpE = - WSSecurityUtil.getDirectChildElement(child, "CipherData", WSConstants.ENC_NS); + XMLUtils.getDirectChildElement(child, "CipherData", WSConstants.ENC_NS); byte[] cipherValue = null; if (tmpE != null) { tmpE = - WSSecurityUtil.getDirectChildElement(tmpE, "CipherValue", WSConstants.ENC_NS); + XMLUtils.getDirectChildElement(tmpE, "CipherValue", WSConstants.ENC_NS); if (tmpE != null) { String content = DOMUtils.getContent(tmpE); cipherValue = Base64.decode(content); http://git-wip-us.apache.org/repos/asf/cxf/blob/ba2d7b85/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java index af38d6e..f290cc4 100644 --- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java +++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java @@ -33,7 +33,6 @@ import javax.xml.ws.soap.SOAPFaultException; import org.w3c.dom.Element; import org.w3c.dom.Node; - import org.apache.cxf.Bus; import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.endpoint.Client; @@ -41,9 +40,9 @@ import org.apache.cxf.frontend.ClientProxy; import org.apache.cxf.systest.ws.common.SecurityTestUtil; import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; import org.apache.wss4j.common.ext.WSSecurityException; +import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.WSSConfig; -import org.apache.wss4j.dom.util.WSSecurityUtil; import org.apache.wss4j.dom.util.XmlSchemaDateFormat; import org.example.contract.doubleit.DoubleItFault; import org.example.contract.doubleit.DoubleItPortType; @@ -311,9 +310,9 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase { // Find the Timestamp + change it. Element timestampElement = - WSSecurityUtil.findElement(securityHeader, "Timestamp", WSConstants.WSU_NS); + XMLUtils.findElement(securityHeader, "Timestamp", WSConstants.WSU_NS); Element createdValue = - WSSecurityUtil.findElement(timestampElement, "Created", WSConstants.WSU_NS); + XMLUtils.findElement(timestampElement, "Created", WSConstants.WSU_NS); DateFormat zulu = new XmlSchemaDateFormat(); XMLGregorianCalendar createdCalendar = @@ -337,7 +336,7 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase { public void modifySecurityHeader(Element securityHeader) { if (securityHeader != null) { Element signatureElement = - WSSecurityUtil.findElement(securityHeader, "Signature", WSConstants.SIG_NS); + XMLUtils.findElement(securityHeader, "Signature", WSConstants.SIG_NS); Node firstChild = signatureElement.getFirstChild(); while (!(firstChild instanceof Element) && firstChild != null) { @@ -358,9 +357,9 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase { public void modifySecurityHeader(Element securityHeader) { if (securityHeader != null) { Element encryptedKey = - WSSecurityUtil.findElement(securityHeader, "EncryptedKey", WSConstants.ENC_NS); + XMLUtils.findElement(securityHeader, "EncryptedKey", WSConstants.ENC_NS); Element cipherValue = - WSSecurityUtil.findElement(encryptedKey, "CipherValue", WSConstants.ENC_NS); + XMLUtils.findElement(encryptedKey, "CipherValue", WSConstants.ENC_NS); String cipherText = cipherValue.getTextContent(); StringBuilder stringBuilder = new StringBuilder(cipherText); @@ -392,7 +391,7 @@ public class ModifiedRequestTest extends AbstractBusClientServerTestBase { public void modifySOAPBody(Element soapBody) { if (soapBody != null) { Element cipherValue = - WSSecurityUtil.findElement(soapBody, "CipherValue", WSConstants.ENC_NS); + XMLUtils.findElement(soapBody, "CipherValue", WSConstants.ENC_NS); String cipherText = cipherValue.getTextContent(); StringBuilder stringBuilder = new StringBuilder(cipherText);
