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 2016/05/18 13:56:16 UTC
cxf git commit: Updating test
Repository: cxf
Updated Branches:
refs/heads/master 9c5bf8a06 -> 0879404be
Updating test
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0879404b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0879404b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0879404b
Branch: refs/heads/master
Commit: 0879404be5bf124c75f48aa67e4305ad76abd14b
Parents: 9c5bf8a
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed May 18 14:56:08 2016 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed May 18 14:56:08 2016 +0100
----------------------------------------------------------------------
.../apache/cxf/ws/security/wss4j/AbstractSecurityTest.java | 7 ++++++-
.../org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/0879404b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
index 38bc2be..10bb9df 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/AbstractSecurityTest.java
@@ -32,6 +32,7 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.stream.XMLStreamReader;
@@ -81,7 +82,11 @@ public abstract class AbstractSecurityTest extends AbstractCXFTest {
* @param doc the document containing the SOAP content.
*/
protected SoapMessage getSoapMessageForDom(Document doc) throws Exception {
- SOAPMessage saajMsg = MessageFactory.newInstance().createMessage();
+ return getSoapMessageForDom(doc, SOAPConstants.SOAP_1_1_PROTOCOL);
+ }
+
+ protected SoapMessage getSoapMessageForDom(Document doc, String protocol) throws Exception {
+ SOAPMessage saajMsg = MessageFactory.newInstance(protocol).createMessage();
SOAPPart part = saajMsg.getSOAPPart();
SAAJStreamWriter writer = new SAAJStreamWriter(part);
StaxUtils.copy(doc, writer);
http://git-wip-us.apache.org/repos/asf/cxf/blob/0879404b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
index bd1b526..1393ef8 100644
--- a/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
+++ b/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JFaultCodeTest.java
@@ -23,6 +23,7 @@ import java.io.ByteArrayInputStream;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPMessage;
import javax.xml.stream.XMLStreamReader;
@@ -225,7 +226,7 @@ public class WSS4JFaultCodeTest extends AbstractSecurityTest {
public void testSignedEncryptedSOAP12Fault() throws Exception {
Document doc = readDocument("wsse-response-fault.xml");
- SoapMessage msg = getSoapMessageForDom(doc);
+ SoapMessage msg = getSoapMessageForDom(doc, SOAPConstants.SOAP_1_2_PROTOCOL);
SOAPMessage saajMsg = msg.getContent(SOAPMessage.class);
doc = saajMsg.getSOAPPart();