cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: StaxSerializer fails on content encryption if there is whitespace child nodes
Date Tue, 31 Jan 2017 15:06:40 GMT
Repository: cxf
Updated Branches:
  refs/heads/master e6a7a95bf -> 9c7ccd5cc


StaxSerializer fails on content encryption if there is whitespace child nodes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3403d79a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3403d79a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3403d79a

Branch: refs/heads/master
Commit: 3403d79a5b538eb61d73242c4128c2823df81ad1
Parents: e6a7a95
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Jan 31 13:23:56 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Jan 31 13:23:56 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/ws/security/wss4j/StaxSerializer.java | 15 ---------------
 1 file changed, 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3403d79a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java
index 6927500..7d5d881 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/StaxSerializer.java
@@ -38,17 +38,14 @@ import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.dom.DOMSource;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
-
 import org.apache.cxf.binding.soap.saaj.SAAJStreamWriter;
 import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
 import org.apache.cxf.staxutils.StaxUtils;
@@ -207,18 +204,6 @@ public class StaxSerializer extends AbstractSerializer {
         }
     }
     
-    @Override
-    public byte[] serializeToByteArray(NodeList content) throws Exception {
-        try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
-            XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(baos);
-            for (int i = 0; i < content.getLength(); i++) {
-                StaxUtils.copy(new DOMSource(content.item(i)), writer);
-            }
-            writer.close();
-            return baos.toByteArray();
-        }
-    }
-
     /**
      * @param ctx
      * @param inputSource


Mime
View raw message