You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2013/07/10 16:20:27 UTC

svn commit: r1501775 [2/2] - in /cxf/trunk: api/src/main/java/org/apache/cxf/helpers/ api/src/main/java/org/apache/cxf/interceptor/ api/src/main/java/org/apache/cxf/staxutils/ api/src/main/java/org/apache/cxf/staxutils/transform/ api/src/test/java/org/...

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java Wed Jul 10 14:20:25 2013
@@ -35,7 +35,6 @@ import org.w3c.dom.Node;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -97,7 +96,7 @@ public class ClientServerGreeterNoWsdlTe
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         Map<String, String> ns = new HashMap<String, String>();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Wed Jul 10 14:20:25 2013
@@ -62,7 +62,6 @@ import org.apache.cxf.common.util.Reflec
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.jaxb_element_test.JaxbElementTest;
 import org.apache.cxf.jaxb_element_test.JaxbElementTest_Service;
@@ -70,6 +69,7 @@ import org.apache.cxf.jaxws.endpoint.dyn
 import org.apache.cxf.ordered_param_holder.ComplexStruct;
 import org.apache.cxf.ordered_param_holder.OrderedParamHolder;
 import org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.systest.jaxws.DocLitBareCodeFirstService.GMonthTest;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.CXF2411Result;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.CXF2411SubClass;
@@ -82,6 +82,7 @@ import org.apache.cxf.tests.inherit.obje
 import org.apache.cxf.tests.inherit.objects.SubTypeB;
 import org.apache.cxf.tests.inherit.types.ObjectInfo;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -106,7 +107,7 @@ public class ClientServerMiscTest extend
         Map<String, String> ns = new HashMap<String, String>();
         ns.put("wsdl", WSDLConstants.NS_WSDL11);
         XPathUtils xpu = new XPathUtils(ns);
-        Document wsdl = XMLUtils.parse(this.getHttpConnection(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl")
+        Document wsdl = StaxUtils.read(this.getHttpConnection(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl")
                                           .getInputStream());
         //XMLUtils.printDOM(wsdl.getDocumentElement());
         assertEquals("DocLitWrappedCodeFirstService impl",
@@ -834,7 +835,7 @@ public class ClientServerMiscTest extend
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerRPCLitTest.java Wed Jul 10 14:20:25 2013
@@ -54,7 +54,6 @@ import org.w3c.dom.NodeList;
 
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.message.Message;
@@ -218,7 +217,7 @@ public class ClientServerRPCLitTest exte
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java Wed Jul 10 14:20:25 2013
@@ -59,9 +59,9 @@ import org.apache.cxf.configuration.secu
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
 import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.transport.http.HTTPConduit;
 import org.apache.hello_world_soap_http.BadRecordLitFault;
@@ -75,6 +75,7 @@ import org.apache.hello_world_soap_http.
 import org.apache.hello_world_soap_http.types.BareDocumentResponse;
 import org.apache.hello_world_soap_http.types.GreetMeLaterResponse;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -774,7 +775,7 @@ public class ClientServerTest extends Ab
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);        
        
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         Map<String, String> ns = new HashMap<String, String>();
@@ -804,7 +805,7 @@ public class ClientServerTest extends Ab
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         Map<String, String> ns = new HashMap<String, String>();
@@ -833,7 +834,7 @@ public class ClientServerTest extends Ab
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
        
                 
@@ -855,7 +856,7 @@ public class ClientServerTest extends Ab
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         
         Map<String, String> ns = new HashMap<String, String>();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java Wed Jul 10 14:20:25 2013
@@ -35,9 +35,9 @@ import javax.xml.xpath.XPathConstants;
 
 import org.w3c.dom.Document;
 
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.headers.HeaderTester;
 import org.apache.headers.XMLHeaderService;
@@ -55,6 +55,7 @@ import org.apache.hello_world_xml_http.m
 import org.apache.hello_world_xml_http.mixed.types.SayHiResponse;
 import org.apache.hello_world_xml_http.wrapped.GreeterFaultImpl;
 import org.apache.hello_world_xml_http.wrapped.PingMeFault;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -140,7 +141,7 @@ public class ClientServerXMLTest extends
         InputStream in = httpConnection.getInputStream();
         assertNotNull(in);
 
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
 
         Map<String, String> ns = new HashMap<String, String>();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AbstractSourcePayloadProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AbstractSourcePayloadProvider.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AbstractSourcePayloadProvider.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AbstractSourcePayloadProvider.java Wed Jul 10 14:20:25 2013
@@ -96,7 +96,7 @@ public abstract class AbstractSourcePayl
         InputStream greetMeInputStream = getClass()
             .getResourceAsStream("resources/GreetMeRpcLiteralRespBody.xml");
         if (DOMSource.class.equals(class1)) {
-            return new DOMSource(XMLUtils.parse(greetMeInputStream));
+            return new DOMSource(StaxUtils.read(greetMeInputStream));
         } else if (StaxSource.class.equals(class1)) {
             if (doneStax) {
                 XMLReader reader = XMLReaderFactory.createXMLReader();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AttachmentProviderXMLClientServerTest.java Wed Jul 10 14:20:25 2013
@@ -20,6 +20,7 @@
 package org.apache.cxf.systest.provider;
 
 import java.io.InputStream;
+import java.io.StringReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.List;
@@ -30,8 +31,9 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.util.Base64Utility;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -73,7 +75,7 @@ public class AttachmentProviderXMLClient
         root = root.substring(idx).trim();
         
 
-        Document result = XMLUtils.parse(root);
+        Document result = StaxUtils.read(new StringReader(root));
         
         List<Element> resList = DOMUtils.findAllElementsByTagName(result.getDocumentElement(), "att");
         assertEquals("Two attachments must've been encoded", 2, resList.size());

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/ProviderXMLClientServerTest.java Wed Jul 10 14:20:25 2013
@@ -31,9 +31,10 @@ import javax.xml.ws.Service;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.hello_world_xml_http.wrapped.XMLService;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -72,7 +73,7 @@ public class ProviderXMLClientServerTest
 
         InputStream is = getClass().getResourceAsStream(
                 "/messages/XML_GreetMeDocLiteralReq.xml");
-        Document doc = XMLUtils.parse(is);
+        Document doc = StaxUtils.read(is);
         DOMSource reqMsg = new DOMSource(doc);
         assertNotNull(reqMsg);
 
@@ -89,7 +90,7 @@ public class ProviderXMLClientServerTest
         
         is = getClass().getResourceAsStream(
             "/messages/XML_GreetMeDocLiteralReq_invalid.xml");
-        doc = XMLUtils.parse(is);
+        doc = StaxUtils.read(is);
         reqMsg = new DOMSource(doc);
         assertNotNull(reqMsg);
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Wed Jul 10 14:20:25 2013
@@ -42,7 +42,6 @@ import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.hello_world_soap_http.BaseGreeterImpl;
 
 import org.junit.Before;
@@ -182,7 +181,6 @@ public class CXFServletTest extends Abst
         assertEquals("text/xml", res.getContentType());
         Document doc = DOMUtils.readXml(res.getInputStream());
         assertNotNull(doc);
-        XMLUtils.printDOM(doc);
         
         assertValid("//wsdl:operation[@name='greetMe']", doc);
         assertValid("//wsdlsoap:address[@location='" + CONTEXT_URL + "/services/greeter']", doc);

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java Wed Jul 10 14:20:25 2013
@@ -38,13 +38,14 @@ import org.w3c.dom.Node;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.hello_world_soap12_http.Greeter;
 import org.apache.hello_world_soap12_http.PingMeFault;
 import org.apache.hello_world_soap12_http.SOAPService;
 import org.apache.hello_world_soap12_http.types.FaultDetail;
+
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -94,7 +95,7 @@ public class Soap12ClientServerTest exte
         assertNotNull(in);
         assertEquals("application/soap+xml; charset=utf-8", httpConnection.getContentType().toLowerCase());
        
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         Map<String, String> ns = new HashMap<String, String>();
         ns.put("soap12", Soap12.SOAP_NAMESPACE);
@@ -122,7 +123,7 @@ public class Soap12ClientServerTest exte
         assertNotNull(in);     
         assertEquals("application/soap+xml; charset=utf-8", httpConnection.getContentType().toLowerCase());
         
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);        
 
         Map<String, String> ns = new HashMap<String, String>();
@@ -164,7 +165,7 @@ public class Soap12ClientServerTest exte
         InputStream in = httpConnection.getErrorStream();                  
         assertNotNull(in);        
             
-        Document doc = XMLUtils.parse(in);
+        Document doc = StaxUtils.read(in);
         assertNotNull(doc);
         Map<String, String> ns = new HashMap<String, String>();
         ns.put("s", Soap12.SOAP_NAMESPACE);
@@ -204,7 +205,7 @@ public class Soap12ClientServerTest exte
         // we expect a soap 1.1 fault from the soap 1.1 test service that does not support soap 1.2
         assertEquals("text/xml;charset=utf-8", httpConnection.getContentType().toLowerCase());
        
-        Document doc = XMLUtils.parse(respin);
+        Document doc = StaxUtils.read(respin);
         assertNotNull(doc);
 
         Map<String, String> ns = new HashMap<String, String>();

Modified: cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java (original)
+++ cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ControlImpl.java Wed Jul 10 14:20:25 2013
@@ -40,10 +40,10 @@ import org.w3c.dom.Node;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.staxutils.StaxUtils;
 
 
 @WebService(serviceName = "ControlService", 
@@ -97,7 +97,7 @@ public class ControlImpl  extends org.ap
 
             Node el;
             try {
-                el = XMLUtils.fromSource(obj);
+                el = StaxUtils.read(obj);
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }

Modified: cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java (original)
+++ cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java Wed Jul 10 14:20:25 2013
@@ -47,8 +47,8 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.systest.ws.util.ConnectionHelper;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.ws.rm.RMManager;
@@ -429,7 +429,7 @@ public class DeliveryAssuranceOnewayTest
 
             Node el;
             try {
-                el = XMLUtils.fromSource(obj);
+                el = StaxUtils.read(obj);
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java (original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java Wed Jul 10 14:20:25 2013
@@ -53,6 +53,7 @@ import org.apache.cxf.interceptor.Loggin
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.systest.ws.common.DoubleItImpl;
 import org.apache.cxf.systest.ws.common.KeystorePasswordCallback;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
@@ -60,7 +61,6 @@ import org.apache.cxf.testutil.common.Ab
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
-
 import org.example.contract.doubleit.DoubleItPortType;
 import org.example.contract.doubleit.DoubleItPortTypeHeader;
 import org.example.schema.doubleit.DoubleIt;
@@ -420,7 +420,7 @@ public class SecurityPolicyTest extends 
         Source source = new StreamSource(new StringReader(req));
         source = disp.invoke(source);
         
-        Node nd = XMLUtils.fromSource(source);
+        Node nd = StaxUtils.read(source);
         if (nd instanceof Document) {
             nd = ((Document)nd).getDocumentElement();
         }
@@ -445,7 +445,7 @@ public class SecurityPolicyTest extends 
             
             Node el;
             try {
-                el = XMLUtils.fromSource(obj);
+                el = StaxUtils.read(obj);
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/Server.java Wed Jul 10 14:20:25 2013
@@ -42,9 +42,9 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.BusFactory;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class Server extends AbstractBusTestServerBase {
@@ -107,7 +107,7 @@ public class Server extends AbstractBusT
             //CHECK the incoming
             Element el;
             try {
-                el = ((Document)XMLUtils.fromSource(obj)).getDocumentElement();
+                el = ((Document)StaxUtils.read(obj)).getDocumentElement();
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }
@@ -140,7 +140,7 @@ public class Server extends AbstractBusT
             
             Element el;
             try {
-                el = ((Document)XMLUtils.fromSource(obj)).getDocumentElement();
+                el = ((Document)StaxUtils.read(obj)).getDocumentElement();
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java Wed Jul 10 14:20:25 2013
@@ -77,7 +77,7 @@ public final class JAXBUtils {
     public static Node innerJaxbPackageBinding(Element schema, String packagevalue) {
         Document doc = schema.getOwnerDocument();
 
-        if (!XMLUtils.hasAttribute(schema, ToolConstants.NS_JAXB_BINDINGS)) {
+        if (!DOMUtils.hasAttribute(schema, ToolConstants.NS_JAXB_BINDINGS)) {
             Attr attr = 
                 schema.getOwnerDocument().createAttributeNS(ToolConstants.NS_JAXB_BINDINGS, 
                                                             "version");

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLCorbaWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLCorbaWriterImpl.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLCorbaWriterImpl.java (original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLCorbaWriterImpl.java Wed Jul 10 14:20:25 2013
@@ -127,7 +127,7 @@ public class WSDLCorbaWriterImpl impleme
 
 
     private void fixSchema(Schema sc, String pfx) throws ParserConfigurationException {
-        Document doc = XMLUtils.newDocument();
+        Document doc = DOMUtils.newDocument();
         Element el = doc.createElementNS(sc.getElementType().getNamespaceURI(),
                             pfx + ":" + sc.getElementType().getLocalPart());
         sc.setElement(el);

Modified: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java (original)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java Wed Jul 10 14:20:25 2013
@@ -35,7 +35,6 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.WSDLConstants;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ProcessorTestBase;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -353,8 +352,8 @@ public class JavaToProcessorTest extends
         File xsd2 = new File(output, "xml-bare_schema2.xsd");
         assertTrue("Generate xsd1 Fail", xsd1.exists());
         assertTrue("Generate xsd2 Fail", xsd2.exists());
-        Document doc1 = XMLUtils.parse(xsd1);
-        Document doc2 = XMLUtils.parse(xsd2);
+        Document doc1 = StaxUtils.read(xsd1);
+        Document doc2 = StaxUtils.read(xsd2);
         String imp = findImport(doc2);
         if (StringUtils.isEmpty(imp)) {
             imp = findImport(doc1);

Modified: cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java (original)
+++ cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Wed Jul 10 14:20:25 2013
@@ -22,7 +22,6 @@ package org.apache.cxf.tools.wsdlto;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -67,9 +66,11 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
 import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.AbstractCXFToolContainer;
 import org.apache.cxf.tools.common.ClassNameProcessor;
 import org.apache.cxf.tools.common.ClassUtils;
@@ -817,9 +818,9 @@ public class WSDLToJavaContainer extends
             //change the import location in wsdl file
             OutputStream wsdloutput = new BufferedOutputStream(new FileOutputStream(wsdlFile));
             WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
-            ByteArrayOutputStream bout = new ByteArrayOutputStream();
+            LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
             wsdlWriter.writeWSDL(def, bout);
-            Element defEle = XMLUtils.parse(bout.toByteArray()).getDocumentElement();
+            Element defEle = StaxUtils.read(bout.createInputStream()).getDocumentElement();
             List<Element> xsdElements = DOMUtils.findAllElementsByTagNameNS(defEle,
                                                                             WSDLConstants.NS_SCHEMA_XSD,
                                                                             "schema");
@@ -834,9 +835,9 @@ public class WSDLToJavaContainer extends
             for (Definition importDef : defs) {
                 File importWsdlFile = new File(outputdir, importWSDLMap.get(importDef.getTargetNamespace()));
                 OutputStream wsdlOs = new BufferedOutputStream(new FileOutputStream(importWsdlFile));
-                bout = new ByteArrayOutputStream();
+                bout = new LoadingByteArrayOutputStream();
                 wsdlWriter.writeWSDL(importDef, bout);
-                Element importEle = XMLUtils.parse(bout.toByteArray()).getDocumentElement();
+                Element importEle = StaxUtils.read(bout.createInputStream()).getDocumentElement();
 
                 xsdElements = DOMUtils.findAllElementsByTagNameNS(importEle, WSDLConstants.NS_SCHEMA_XSD,
                                                                   "schema");

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParserTest.java?rev=1501775&r1=1501774&r2=1501775&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParserTest.java (original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParserTest.java Wed Jul 10 14:20:25 2013
@@ -26,7 +26,9 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ProcessorTestBase;
+
 import org.junit.Test;
 
 public class CustomizationParserTest extends ProcessorTestBase {
@@ -64,7 +66,7 @@ public class CustomizationParserTest ext
 
         File file = new File(output, "custom_test.xsd");
         XMLUtils.writeTo(schemaNode, new FileOutputStream(file));
-        Document testNode = XMLUtils.parse(file);
+        Document testNode = StaxUtils.read(file);
 
         Node result = selector.queryNode(testNode, checkingPoint);
         assertNotNull(result);
@@ -80,7 +82,7 @@ public class CustomizationParserTest ext
 
         File file = new File(output, "custom_test.wsdl");
         XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
-        Document testNode = XMLUtils.parse(file);
+        Document testNode = StaxUtils.read(file);
 
         String[] checkingPoints =
             new String[]{"wsdl:definitions/wsdl:portType/jaxws:bindings/jaxws:class",
@@ -102,7 +104,7 @@ public class CustomizationParserTest ext
 
         File file = new File(output, "custom_test.wsdl");
         XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
-        Document testNode = XMLUtils.parse(file);
+        Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);
     }
@@ -120,7 +122,7 @@ public class CustomizationParserTest ext
 
         File file = new File(output, "custom_test.wsdl");
         XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
-        Document testNode = XMLUtils.parse(file);
+        Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);
     }
@@ -142,13 +144,13 @@ public class CustomizationParserTest ext
 
         File file = new File(output, "custom_test4.wsdl");
         XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
-        Document testNode = XMLUtils.parse(file);
+        Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);
     }
 
     private Element getDocumentElement(final String resource) throws Exception {
-        return XMLUtils.parse(getClass().getResourceAsStream(resource)).getDocumentElement();
+        return StaxUtils.read(getClass().getResourceAsStream(resource)).getDocumentElement();
     }
 
     private void checking(Node node, String[] checkingPoints) {