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 18:35:53 UTC

svn commit: r1501836 - in /cxf/trunk: api/src/main/java/org/apache/cxf/helpers/ api/src/main/java/org/apache/cxf/staxutils/ api/src/main/java/org/apache/cxf/ws/addressing/ api/src/test/java/org/apache/cxf/helpers/ api/src/test/java/org/apache/cxf/staxu...

Author: dkulp
Date: Wed Jul 10 16:35:51 2013
New Revision: 1501836

URL: http://svn.apache.org/r1501836
Log:
Remove XMLUtils

Removed:
    cxf/trunk/api/src/main/java/org/apache/cxf/helpers/XMLUtils.java
    cxf/trunk/api/src/test/java/org/apache/cxf/helpers/XMLUtilsTest.java
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
    cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
    cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/W3CDOMStreamReaderTest.java
    cxf/trunk/distribution/src/main/release/samples/callback/src/main/java/demo/callback/client/Client.java
    cxf/trunk/distribution/src/main/release/samples/restful_dispatch/src/main/java/demo/restful/client/Client.java
    cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultOutInterceptor.java
    cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java
    cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/MultipleSchemaInNSTest.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedOutInterceptor.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
    cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SamlTokenTest.java
    cxf/trunk/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/AbstractSourcePayloadProvider.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/test/XPathAssert.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/SchemaWriterImpl.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLCorbaWriterImpl.java
    cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
    cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
    cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
    cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
    cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/CustomizedWSDLLocator.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParserTest.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java Wed Jul 10 16:35:51 2013
@@ -67,7 +67,7 @@ public final class DOMUtils {
     private static DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         if (loader == null) {
-            loader = XMLUtils.class.getClassLoader();
+            loader = DOMUtils.class.getClassLoader();
         }
         if (loader == null) {
             return DocumentBuilderFactory.newInstance().newDocumentBuilder();
@@ -271,18 +271,18 @@ public final class DOMUtils {
      * @param attName attribute we're looking for
      * @param attVal attribute value or null if we just want any
      */
-    public static Node findChildWithAtt(Node parent, String elemName, String attName, String attVal) {
+    public static Element findChildWithAtt(Node parent, String elemName, String attName, String attVal) {
 
-        Node child = DOMUtils.getChild(parent, Node.ELEMENT_NODE);
+        Element child = (Element)getChild(parent, Node.ELEMENT_NODE);
         if (attVal == null) {
             while (child != null && (elemName == null || elemName.equals(child.getNodeName()))
                    && DOMUtils.getAttribute(child, attName) != null) {
-                child = getNext(child, elemName, Node.ELEMENT_NODE);
+                child = (Element)getNext(child, elemName, Node.ELEMENT_NODE);
             }
         } else {
             while (child != null && (elemName == null || elemName.equals(child.getNodeName()))
                    && !attVal.equals(DOMUtils.getAttribute(child, attName))) {
-                child = getNext(child, elemName, Node.ELEMENT_NODE);
+                child = (Element)getNext(child, elemName, Node.ELEMENT_NODE);
             }
         }
         return child;

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed Jul 10 16:35:51 2013
@@ -640,6 +640,36 @@ public final class StaxUtils {
         xsw.close();
     }
     
+    public static void writeTo(Node node, OutputStream os) throws XMLStreamException {
+        copy(new DOMSource(node), os);
+    }
+    public static void writeTo(Node node, OutputStream os, int indent) throws XMLStreamException {
+        if (indent > 0) {
+            XMLStreamWriter writer = new PrettyPrintXMLStreamWriter(createXMLStreamWriter(os), indent);
+            try {
+                copy(new DOMSource(node), writer);
+            } finally {
+                writer.close();
+            }
+        } else {
+            copy(new DOMSource(node), os);
+        }
+    }
+    public static void writeTo(Node node, Writer os) throws XMLStreamException {
+        writeTo(node, os, 0);
+    }
+    public static void writeTo(Node node, Writer os, int indent) throws XMLStreamException {
+        XMLStreamWriter writer = createXMLStreamWriter(os);
+        if (indent > 0) {
+            writer = new PrettyPrintXMLStreamWriter(writer, indent);
+        }
+        try {
+            copy(new DOMSource(node), writer);
+        } finally {
+            writer.close();
+        }
+    }    
+    
     
     /**
      * Copies the reader to the writer. The start and end document methods must
@@ -1687,22 +1717,41 @@ public final class StaxUtils {
         }
     }
 
-    public static String toString(Document doc) throws XMLStreamException {
+    public static String toString(Source src) {
+        StringWriter sw = new StringWriter(1024);
+        XMLStreamWriter writer = null;
+        try {
+            writer = createXMLStreamWriter(sw);
+            copy(src, writer);
+            writer.flush();
+        } catch (XMLStreamException e) {
+            throw new RuntimeException(e);
+        } finally {
+            StaxUtils.close(writer);
+        }
+        return sw.toString();
+    }
+    public static String toString(Node src) {
+        return toString(new DOMSource(src));
+    }
+    public static String toString(Document doc) {
         StringWriter sw = new StringWriter(1024);
         XMLStreamWriter writer = null;
         try {
             writer = createXMLStreamWriter(sw);
             copy(doc, writer);
             writer.flush();
+        } catch (XMLStreamException e) {
+            throw new RuntimeException(e);
         } finally {
             StaxUtils.close(writer);
         }
         return sw.toString();
     }
-    public static String toString(Element el) throws XMLStreamException {
+    public static String toString(Element el) {
         return toString(el, 0);
     }
-    public static String toString(Element el, int indent) throws XMLStreamException {
+    public static String toString(Element el, int indent) {
         StringWriter sw = new StringWriter(1024);
         XMLStreamWriter writer = null;
         try {
@@ -1712,6 +1761,8 @@ public final class StaxUtils {
             }
             copy(el, writer);
             writer.flush();
+        } catch (XMLStreamException e) {
+            throw new RuntimeException(e);
         } finally {
             StaxUtils.close(writer);
         }        

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java Wed Jul 10 16:35:51 2013
@@ -429,8 +429,6 @@ public class W3CDOMStreamReader extends 
         }
         try {
             return StaxUtils.toString(document);
-        } catch (XMLStreamException e) {
-            return super.toString();
         } catch (Throwable t) {
             t.printStackTrace();
             return super.toString();

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java Wed Jul 10 16:35:51 2013
@@ -335,8 +335,6 @@ public class W3CDOMStreamWriter implemen
         }
         try {
             return StaxUtils.toString(document);
-        } catch (XMLStreamException e) {
-            return super.toString();
         } catch (Throwable t) {
             t.printStackTrace();
             return super.toString();

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/EndpointReferenceUtils.java Wed Jul 10 16:35:51 2013
@@ -72,7 +72,6 @@ import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerRegistry;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.helpers.LoadingByteArrayOutputStream;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.resource.ExtendedURIResolver;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.service.model.SchemaInfo;
@@ -634,7 +633,7 @@ public final class EndpointReferenceUtil
                 // Something not right with the schema from the wsdl.
                 LOG.log(Level.WARNING, "SAXException for newSchema()", ex);
                 for (SchemaInfo schemaInfo : serviceInfo.getSchemas()) {
-                    String s = XMLUtils.toString(schemaInfo.getElement(), 4);
+                    String s = StaxUtils.toString(schemaInfo.getElement(), 4);
                     LOG.log(Level.INFO, "Schema for: " + schemaInfo.getNamespaceURI() + "\n" + s);
                 }
             } finally { 

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/StaxUtilsTest.java Wed Jul 10 16:35:51 2013
@@ -42,7 +42,6 @@ import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -239,7 +238,7 @@ public class StaxUtilsTest extends Asser
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         dbf.setNamespaceAware(true);
         Document doc = dbf.newDocumentBuilder().parse(new InputSource(reader));
-        String orig = XMLUtils.toString(doc.getDocumentElement());
+        String orig = StaxUtils.toString(doc.getDocumentElement());
         
         StringWriter sw = new StringWriter();
         XMLStreamWriter swriter = StaxUtils.createXMLStreamWriter(sw);
@@ -253,7 +252,7 @@ public class StaxUtilsTest extends Asser
         
         W3CDOMStreamWriter domwriter = new W3CDOMStreamWriter();
         StaxUtils.writeDocument(doc, domwriter, false, true);
-        output = XMLUtils.toString(domwriter.getDocument().getDocumentElement());
+        output = StaxUtils.toString(domwriter.getDocument().getDocumentElement());
         assertEquals(orig, output);
     }
     

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/W3CDOMStreamReaderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/W3CDOMStreamReaderTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/W3CDOMStreamReaderTest.java (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/W3CDOMStreamReaderTest.java Wed Jul 10 16:35:51 2013
@@ -34,7 +34,6 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -68,7 +67,7 @@ public class W3CDOMStreamReaderTest exte
         XMLStreamReader reader = StaxUtils.createXMLStreamReader(new DOMSource(doc));
 
         StaxUtils.copy(reader, writer);
-        assertTrue(XMLUtils.toString(writer.getDocument()).endsWith(RESULT));
+        assertTrue(StaxUtils.toString(writer.getDocument()).endsWith(RESULT));
 
     }
     

Modified: cxf/trunk/distribution/src/main/release/samples/callback/src/main/java/demo/callback/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/callback/src/main/java/demo/callback/client/Client.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/callback/src/main/java/demo/callback/client/Client.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/callback/src/main/java/demo/callback/client/Client.java Wed Jul 10 16:35:51 2013
@@ -33,7 +33,8 @@ import org.w3c.dom.Element;
 
 import org.apache.callback.SOAPService;
 import org.apache.callback.ServerPortType;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 
 
@@ -71,10 +72,10 @@ public final class Client {
         ServerPortType port = ss.getSOAPPort();
         
         InputStream is = demo.callback.client.Client.class.getResourceAsStream("/callback_infoset.xml");
-        Document doc = XMLUtils.parse(is);
-        Element referenceParameters = XMLUtils.fetchElementByNameAttribute(doc.getDocumentElement(),
-                                                                           "wsa:ReferenceParameters",
-                                                                           "");
+        Document doc = StaxUtils.read(is);
+        Element referenceParameters = DOMUtils.findChildWithAtt(doc.getDocumentElement(),
+                                                                "wsa:ReferenceParameters",
+                                                                "name", "");
         W3CEndpointReference ref = (W3CEndpointReference)endpoint.getEndpointReference(referenceParameters);
         
 

Modified: cxf/trunk/distribution/src/main/release/samples/restful_dispatch/src/main/java/demo/restful/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/restful_dispatch/src/main/java/demo/restful/client/Client.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/restful_dispatch/src/main/java/demo/restful/client/Client.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/restful_dispatch/src/main/java/demo/restful/client/Client.java Wed Jul 10 16:35:51 2013
@@ -40,7 +40,7 @@ import javax.xml.ws.http.HTTPBinding;
 
 import org.w3c.dom.Document;
 
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public final class Client {
 
@@ -76,7 +76,7 @@ public final class Client {
 
         Client client = new Client();
         InputStream is = client.getClass().getResourceAsStream("/CustomerJohnReq.xml");
-        Document doc = XMLUtils.parse(is);
+        Document doc = StaxUtils.read(is);
         DOMSource reqMsg = new DOMSource(doc);
 
         requestContext.put(MessageContext.HTTP_REQUEST_METHOD, "POST");

Modified: cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultOutInterceptor.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultOutInterceptor.java (original)
+++ cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamFaultOutInterceptor.java Wed Jul 10 16:35:51 2013
@@ -47,7 +47,6 @@ import org.apache.cxf.binding.corba.wsdl
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -61,6 +60,7 @@ import org.apache.cxf.service.model.Mess
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.service.model.ServiceModelUtil;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.omg.CORBA.Any;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.ServerRequest;
@@ -302,7 +302,7 @@ public class CorbaStreamFaultOutIntercep
         }
         
         if (LOG.isLoggable(Level.FINE)) {
-            LOG.fine("Exception DOM: " + XMLUtils.toString(faultElement));
+            LOG.fine("Exception DOM: " + StaxUtils.toString(faultElement));
         }
         return faultDoc;
     }

Modified: cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java (original)
+++ cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/interceptor/SoapFaultSerializerTest.java Wed Jul 10 16:35:51 2013
@@ -47,7 +47,6 @@ import org.apache.cxf.binding.soap.inter
 import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
 import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.SAAJPreInInterceptor;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.ExchangeImpl;
@@ -71,7 +70,7 @@ public class SoapFaultSerializerTest ext
         XPathUtils xpu = new XPathUtils(namespaces);
         if (!xpu.isExist(xpathExpression, doc, XPathConstants.NODE)) {
             throw new AssertionFailedError("Failed to select any nodes for expression:\n" + xpathExpression
-                                           + " from document:\n" + XMLUtils.toString(doc));
+                                           + " from document:\n" + StaxUtils.toString(doc));
         }
     }
     

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java Wed Jul 10 16:35:51 2013
@@ -36,7 +36,6 @@ import org.w3c.dom.Node;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.databinding.DataReader;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Attachment;
@@ -58,7 +57,7 @@ public class NodeDataReader implements D
         } else if (StreamSource.class.isAssignableFrom(type)) {
             try {
                 CachedOutputStream out = new CachedOutputStream();
-                XMLUtils.writeTo(input, out);
+                StaxUtils.writeTo(input, out);
                 InputStream is = out.getInputStream();
                 out.close();
                 

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java (original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/AbstractEncodedTest.java Wed Jul 10 16:35:51 2013
@@ -40,7 +40,7 @@ import org.apache.cxf.aegis.xml.stax.Ele
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.helpers.MapNamespaceContext;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 import org.junit.Before;
 
@@ -101,7 +101,7 @@ public abstract class AbstractEncodedTes
     }
 
     public Object readRef(Element element) throws XMLStreamException {
-        String xml = XMLUtils.toString(element);
+        String xml = StaxUtils.toString(element);
         ElementReader root;
         try {
             root = new ElementReader(new ByteArrayInputStream(xml.getBytes("utf-8")));

Modified: cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/MultipleSchemaInNSTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/MultipleSchemaInNSTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/MultipleSchemaInNSTest.java (original)
+++ cxf/trunk/rt/databinding/xmlbeans/src/test/java/org/apache/cxf/xmlbeans/MultipleSchemaInNSTest.java Wed Jul 10 16:35:51 2013
@@ -20,11 +20,12 @@ package org.apache.cxf.xmlbeans;
 
 import javax.xml.namespace.QName;
 
-import org.w3c.dom.Node;
+import org.w3c.dom.Document;
 import org.w3c.dom.NodeList;
 
 import org.apache.cxf.common.util.SOAPConstants;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
+
 import org.junit.Before;
 import org.junit.Test;
   
@@ -46,11 +47,11 @@ public class MultipleSchemaInNSTest exte
 
     @Test
     public void testWSDL() throws Exception {
-        Node wsdl = getWSDLDocument("MultipleSchemaService");
+        Document wsdl = getWSDLDocument("MultipleSchemaService");
 
         addNamespace("xsd", SOAPConstants.XSD);
         NodeList list = assertValid("//xsd:schema[@targetNamespace='" + ns + "']", wsdl);
-        assertEquals(XMLUtils.toString(wsdl), 3, list.getLength());
+        assertEquals(StaxUtils.toString(wsdl), 3, list.getLength());
         assertValid("//xsd:import[@namespace='" + ns + "']",
                     list.item(0));
         assertValid("//xsd:import[@namespace='" + ns + "']", list.item(0));

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/xml/XMLSource.java Wed Jul 10 16:35:51 2013
@@ -329,11 +329,7 @@ public class XMLSource {
     private <T> Object readPrimitiveValue(Node node, Class<T> cls) {
         if (String.class == cls) {
             if (node.getNodeType() == Node.ELEMENT_NODE) {
-                try {
-                    return StaxUtils.toString((Element)node);
-                } catch (XMLStreamException e) {
-                    // won't happen
-                }
+                return StaxUtils.toString((Element)node);
             } else {
                 return cls.cast(node.getNodeValue());
             }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java Wed Jul 10 16:35:51 2013
@@ -87,7 +87,6 @@ import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.jaxrs.JAXRSServiceImpl;
 import org.apache.cxf.jaxrs.ext.Oneway;
 import org.apache.cxf.jaxrs.ext.multipart.Multipart;
@@ -381,7 +380,39 @@ public class WadlGenerator implements Co
     }
 
     private String xmlEncodeIfNeeded(String value) {
-        return XMLUtils.xmlEncode(value);
+        
+        StringBuilder builder = new StringBuilder(value.length());
+        boolean change = false;
+        for (int x = 0; x < value.length(); x++) {
+            char ch = value.charAt(x);
+            String ap = null;
+            switch (ch) {
+            case '\"':
+                ap = "&quot;";
+                break;
+            case '\'':
+                ap = "&apos;";
+                break;
+            case '<':
+                ap = "&lt;";
+                break;
+            case '>':
+                ap = "&gt;";
+                break;
+            case '&':
+                ap = "&amp;";
+                break;
+            default:
+                ap = null;
+            }
+            if (ap != null) {
+                change = true;
+                builder.append(ap);
+            } else {
+                builder.append(ch);
+            }
+        }
+        return change ? builder.toString() : value;
     }
     
     private void startMethodTag(StringBuilder sb, OperationResourceInfo ori) {

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilder.java Wed Jul 10 16:35:51 2013
@@ -46,7 +46,6 @@ import org.apache.cxf.common.i18n.Bundle
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.jaxws.javaee.PortComponentHandlerType;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -96,7 +95,7 @@ public class AnnotationHandlerChainBuild
                 if (!"http://java.sun.com/xml/ns/javaee".equals(el.getNamespaceURI()) 
                     || !"handler-chains".equals(el.getLocalName())) {
                         
-                    String xml = XMLUtils.toString(el);
+                    String xml = StaxUtils.toString(el);
                     throw new WebServiceException(
                         BundleUtils.getFormattedString(BUNDLE,
                                                        "NOT_VALID_ROOT_ELEMENT",
@@ -113,7 +112,7 @@ public class AnnotationHandlerChainBuild
                         if (!el.getNamespaceURI().equals("http://java.sun.com/xml/ns/javaee") 
                             || !el.getLocalName().equals("handler-chain")) {
                                 
-                            String xml = XMLUtils.toString(el);
+                            String xml = StaxUtils.toString(el);
                             throw new WebServiceException(
                                 BundleUtils.getFormattedString(BUNDLE,
                                                                "NOT_VALID_ELEMENT_IN_HANDLER",
@@ -146,7 +145,7 @@ public class AnnotationHandlerChainBuild
             if (cur instanceof Element) {
                 el = (Element)cur;
                 if (!el.getNamespaceURI().equals("http://java.sun.com/xml/ns/javaee")) {
-                    String xml = XMLUtils.toString(el);
+                    String xml = StaxUtils.toString(el);
                     throw new WebServiceException(
                         BundleUtils.getFormattedString(BUNDLE,
                                                        "NOT_VALID_ELEMENT_IN_HANDLER",
@@ -210,7 +209,7 @@ public class AnnotationHandlerChainBuild
             return true;
         }
         if (!namePattern.contains(":")) {
-            String xml = XMLUtils.toString(el);
+            String xml = StaxUtils.toString(el);
             throw new WebServiceException(
                 BundleUtils.getFormattedString(BUNDLE,
                                                "NOT_A_QNAME_PATTER",

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Wed Jul 10 16:35:51 2013
@@ -381,7 +381,6 @@ public class CodeFirstTest extends Abstr
         factory.setAddress("local://localhost/test"); 
         Server server = factory.create();
         Document doc = getWSDLDocument(server);
-        //XMLUtils.printDOM(doc);
         assertValid("//xsd:schema/xsd:complexType[@name='entity']", doc);
     }
     
@@ -399,7 +398,6 @@ public class CodeFirstTest extends Abstr
         Server server = null;
         server = factory.create();
         Document doc = getWSDLDocument(server);
-        //org.apache.cxf.helpers.XMLUtils.printDOM(doc);
         assertValid("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/xsd:element[@type='xs:int']",
                     doc);
         
@@ -416,7 +414,6 @@ public class CodeFirstTest extends Abstr
         factory.setAddress("local://localhost/test2"); 
         server = factory.create();
         Document doc2 = getWSDLDocument(server);
-        //org.apache.cxf.helpers.XMLUtils.printDOM(doc2);
         assertValid("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/"
                     + "xsd:element[@type='xs:float']",
                     doc2);

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedOutInterceptor.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedOutInterceptor.java (original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedOutInterceptor.java Wed Jul 10 16:35:51 2013
@@ -24,12 +24,12 @@ import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.rs.security.xml.AbstractXmlSecOutInterceptor;
 import org.apache.cxf.rs.security.xml.XmlEncOutInterceptor;
 import org.apache.cxf.rs.security.xml.XmlSigOutInterceptor;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
 
 
@@ -100,7 +100,7 @@ public class SamlEnvelopedOutInterceptor
             // TODO: this is not critical now - but figure out if we can avoid copying
             // DOMs
             CachedOutputStream bos = new CachedOutputStream();
-            XMLUtils.writeTo(newDoc, bos);
+            StaxUtils.writeTo(newDoc, bos);
             return DOMUtils.readXml(bos.getInputStream());
         } else {
             return newDoc;

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java (original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java Wed Jul 10 16:35:51 2013
@@ -27,7 +27,7 @@ import org.apache.aries.blueprint.Parser
 import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
@@ -66,7 +66,7 @@ public class JettyServerEngineFactoryPar
         try {
             // Print the DOM node
 
-            String xmlString = XMLUtils.toString(element);
+            String xmlString = StaxUtils.toString(element);
             ef.addProperty("parsedElement", createValue(context, xmlString));
             ef.setInitMethod("init");
             ef.setActivation(ComponentMetadata.ACTIVATION_EAGER);

Modified: cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java (original)
+++ cxf/trunk/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/blueprint/NettyServerEngineFactoryParser.java Wed Jul 10 16:35:51 2013
@@ -27,7 +27,7 @@ import org.apache.aries.blueprint.Parser
 import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
 import org.osgi.service.blueprint.reflect.Metadata;
 
@@ -61,7 +61,7 @@ public class NettyServerEngineFactoryPar
 
         try {
             // Print the DOM node
-            String xmlString = XMLUtils.toString(element);
+            String xmlString = StaxUtils.toString(element);
             ef.addProperty("parsedElement", createValue(context, xmlString));
             ef.setInitMethod("init");
             ef.setActivation(ComponentMetadata.ACTIVATION_EAGER);

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java (original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java Wed Jul 10 16:35:51 2013
@@ -46,7 +46,6 @@ import org.apache.cxf.binding.soap.inter
 import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils.NullResolver;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
@@ -585,7 +584,7 @@ public class WSS4JInOutTest extends Abst
     }
     
     // FOR DEBUGGING ONLY
-    /*private*/ static String serialize(Document doc) throws Exception {
-        return XMLUtils.toString(doc);
+    /*private*/ static String serialize(Document doc) {
+        return StaxUtils.toString(doc);
     }
 }

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SamlTokenTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SamlTokenTest.java (original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/saml/SamlTokenTest.java Wed Jul 10 16:35:51 2013
@@ -40,7 +40,6 @@ import org.w3c.dom.Document;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils.NullResolver;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
@@ -596,6 +595,6 @@ public class SamlTokenTest extends Abstr
 
     // FOR DEBUGGING ONLY
     /*private*/ static String serialize(Document doc) throws Exception {
-        return XMLUtils.toString(doc);
+        return StaxUtils.toString(doc);
     }
 }

Modified: cxf/trunk/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java (original)
+++ cxf/trunk/rt/wsdl/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java Wed Jul 10 16:35:51 2013
@@ -49,7 +49,6 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.service.model.BindingFaultInfo;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingMessageInfo;
@@ -62,6 +61,7 @@ import org.apache.cxf.service.model.Mess
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.apache.cxf.ws.addressing.EndpointReferenceUtils;
@@ -475,7 +475,7 @@ public class WSDLServiceBuilderTest exte
                 file.delete();
             }
             FileOutputStream fout = new FileOutputStream(file);
-            XMLUtils.writeTo(doc, fout);
+            StaxUtils.writeTo(doc, fout);
             fout.flush();
             fout.close();
         }

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java Wed Jul 10 16:35:51 2013
@@ -61,7 +61,6 @@ import org.xml.sax.InputSource;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.soap.saaj.SAAJUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.jaxws.DispatchImpl;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -650,7 +649,7 @@ public class DispatchClientServerTest ex
         SAXSource saxSourceResp = disp.invoke(saxSourceReq);
         assertNotNull(saxSourceResp);
         String expected = "Hello TestSOAPInputMessage";
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp).contains(expected));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp).contains(expected));
 
         // Test oneway
         InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq1.xml");
@@ -669,7 +668,7 @@ public class DispatchClientServerTest ex
         SAXSource saxSourceResp2 = response.get();
         assertNotNull(saxSourceResp2);
         String expected2 = "Hello TestSOAPInputMessage2";
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp2).contains(expected2));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp2).contains(expected2));
 
         // Test async callback
         InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq3.xml");
@@ -684,7 +683,7 @@ public class DispatchClientServerTest ex
         String expected3 = "Hello TestSOAPInputMessage3";
         SAXSource saxSourceResp3 = tssh.getSAXSource();
         assertNotNull(saxSourceResp3);
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp3).contains(expected3));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp3).contains(expected3));
     }
 
     @Test
@@ -713,7 +712,7 @@ public class DispatchClientServerTest ex
         SAXSource saxSourceResp = disp.invoke(saxSourceReq);
         assertNotNull(saxSourceResp);
         String expected = "Hello TestSOAPInputMessage";
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp).contains(expected));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp).contains(expected));
 
         // Test oneway
         InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq1.xml");
@@ -737,7 +736,7 @@ public class DispatchClientServerTest ex
         SAXSource saxSourceResp2 = response.get();
         assertNotNull(saxSourceResp2);
         String expected2 = "Hello TestSOAPInputMessage2";
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp2).contains(expected2));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp2).contains(expected2));
 
         // Test async callback
         InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq3.xml");
@@ -756,7 +755,7 @@ public class DispatchClientServerTest ex
         String expected3 = "Hello TestSOAPInputMessage3";
         SAXSource saxSourceResp3 = tssh.getSAXSource();
         assertNotNull(saxSourceResp3);
-        assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp3).contains(expected3));
+        assertTrue("Expected: " + expected, StaxUtils.toString(saxSourceResp3).contains(expected3));
     }
 
     @Test
@@ -779,7 +778,7 @@ public class DispatchClientServerTest ex
         StreamSource streamSourceResp = disp.invoke(streamSourceReq);
         assertNotNull(streamSourceResp);
         String expected = "Hello TestSOAPInputMessage";
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp).contains(expected));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp).contains(expected));
 
         InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq1.xml");
         StreamSource streamSourceReq1 = new StreamSource(is1);
@@ -793,7 +792,7 @@ public class DispatchClientServerTest ex
         StreamSource streamSourceResp2 = response.get();
         assertNotNull(streamSourceResp2);
         String expected2 = "Hello TestSOAPInputMessage2";
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp2).contains(expected2));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp2).contains(expected2));
 
         InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq3.xml");
         StreamSource streamSourceReq3 = new StreamSource(is3);
@@ -806,7 +805,7 @@ public class DispatchClientServerTest ex
         String expected3 = "Hello TestSOAPInputMessage3";
         StreamSource streamSourceResp3 = tssh.getStreamSource();
         assertNotNull(streamSourceResp3);
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp3).contains(expected3));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp3).contains(expected3));
     }
 
     @Test
@@ -830,7 +829,7 @@ public class DispatchClientServerTest ex
         StreamSource streamSourceResp = disp.invoke(streamSourceReq);
         assertNotNull(streamSourceResp);
         String expected = "Hello TestSOAPInputMessage";
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp).contains(expected));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp).contains(expected));
 
         InputStream is1 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq1.xml");
         StreamSource streamSourceReq1 = new StreamSource(is1);
@@ -845,7 +844,7 @@ public class DispatchClientServerTest ex
         StreamSource streamSourceResp2 = response.get();
         assertNotNull(streamSourceResp2);
         String expected2 = "Hello TestSOAPInputMessage2";
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp2).contains(expected2));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp2).contains(expected2));
 
         // Test async callback
         InputStream is3 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq3.xml");
@@ -860,7 +859,7 @@ public class DispatchClientServerTest ex
         String expected3 = "Hello TestSOAPInputMessage3";
         StreamSource streamSourceResp3 = tssh.getStreamSource();
         assertNotNull(streamSourceResp3);
-        assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp3).contains(expected3));
+        assertTrue("Expected: " + expected, StaxUtils.toString(streamSourceResp3).contains(expected3));
     }
     
     @Test

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java Wed Jul 10 16:35:51 2013
@@ -36,7 +36,6 @@ import javax.xml.ws.WebServiceException;
 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.cxf.testutil.common.TestUtil;
@@ -109,7 +108,7 @@ public class DispatchXMLClientServerTest
         Source source = disp.invoke(reqMsg);
         assertNotNull(source);
                 
-        String streamString = XMLUtils.toString(source); 
+        String streamString = StaxUtils.toString(source); 
         Document doc = StaxUtils.read(new StringReader(streamString));
         assertEquals("greetMeResponse", doc.getFirstChild().getLocalName());
         assertEquals("Hello tli", doc.getFirstChild().getTextContent());

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -44,7 +44,6 @@ import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.XMLReaderFactory;
 
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.staxutils.StaxSource;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -132,7 +131,7 @@ public abstract class AbstractSourcePayl
                 //for the preferred type. However, older xalans don't know about it
                 //we'll manually do it
                 XMLStreamReader r = (XMLStreamReader)s.getClass().getMethod("getXMLStreamReader").invoke(s);
-                return XMLUtils.toString(StaxUtils.read(r).getDocumentElement());
+                return StaxUtils.toString(StaxUtils.read(r).getDocumentElement());
             }
             throw te;
         }

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -47,7 +47,6 @@ import org.w3c.dom.Node;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxws.EndpointImpl;
@@ -428,7 +427,7 @@ public class SecurityPolicyTest extends 
         ns.put("ns2", "http://www.example.org/schema/DoubleIt");
         XPathUtils xp = new XPathUtils(ns);
         Object o = xp.getValue("//ns2:DoubleItResponse/doubledNumber", nd, XPathConstants.STRING);
-        assertEquals(XMLUtils.toString(nd), "50", o);
+        assertEquals(StaxUtils.toString(nd), "50", o);
         
         bus.shutdown(true);
     }

Modified: cxf/trunk/testutils/src/main/java/org/apache/cxf/test/XPathAssert.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/test/XPathAssert.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/cxf/test/XPathAssert.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/cxf/test/XPathAssert.java Wed Jul 10 16:35:51 2013
@@ -34,7 +34,7 @@ import org.w3c.dom.NodeList;
 import junit.framework.AssertionFailedError;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 import org.junit.Assert;
 
@@ -91,7 +91,7 @@ public final class XPathAssert {
     }
 
     private static String writeNodeToString(Node node) {
-        return XMLUtils.toString(node);
+        return StaxUtils.toString(node);
     }
 
     /**

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -32,7 +32,7 @@ import org.w3c.dom.Node;
 
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 
 public final class JAXBUtils {
@@ -131,7 +131,7 @@ public final class JAXBUtils {
         try {
             tmpFile = FileUtils.createTempFile("customzied", ".xsd");
             fout = new FileOutputStream(tmpFile);
-            XMLUtils.writeTo(rootElement, fout);
+            StaxUtils.writeTo(rootElement, fout);
         } catch (Exception e) {
             e.printStackTrace();
         } finally {

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/SchemaWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/SchemaWriterImpl.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/SchemaWriterImpl.java (original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/SchemaWriterImpl.java Wed Jul 10 16:35:51 2013
@@ -36,7 +36,7 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 
  /*
@@ -84,14 +84,14 @@ public class SchemaWriterImpl implements
 
     public void writeWSDL(Definition wsdlDef, Writer sink) throws WSDLException {
         try {
-            XMLUtils.writeTo(getDocument(wsdlDef), sink, 2);
+            StaxUtils.writeTo(getDocument(wsdlDef), sink, 2);
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
         }
     }    
     public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException {
         try {
-            XMLUtils.writeTo(getDocument(wsdlDef), sink, 2);
+            StaxUtils.writeTo(getDocument(wsdlDef), sink, 2);
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
         }

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -39,7 +39,7 @@ import org.w3c.dom.Element;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
  /*
   * This class is extending the wsdl4j RI class to print out the 
@@ -143,14 +143,14 @@ public class WSDLCorbaWriterImpl impleme
 
     public void writeWSDL(Definition wsdlDef, Writer sink) throws WSDLException {
         try {
-            XMLUtils.writeTo(getDocument(wsdlDef), sink, 2);
+            StaxUtils.writeTo(getDocument(wsdlDef), sink, 2);
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
         }
     }    
     public void writeWSDL(Definition wsdlDef, OutputStream sink) throws WSDLException {
         try {
-            XMLUtils.writeTo(getDocument(wsdlDef), sink, 2);
+            StaxUtils.writeTo(getDocument(wsdlDef), sink, 2);
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
         }

Modified: cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java (original)
+++ cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/WSDL11Generator.java Wed Jul 10 16:35:51 2013
@@ -43,8 +43,8 @@ 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.service.model.SchemaInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.java2wsdl.generator.AbstractGenerator;
 import org.apache.cxf.tools.util.FileWriterUtil;
@@ -113,7 +113,7 @@ public class WSDL11Generator extends Abs
                 updateImports(el, imports);
                 os = new FileWriterUtil(impfile.getParent(),
                                         getToolContext().get(OutputStreamCreator.class)).getWriter(impfile, "UTF-8");
-                XMLUtils.writeTo(el, os, 2);
+                StaxUtils.writeTo(el, os, 2);
                 os.close();
             }
 

Modified: cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java (original)
+++ cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java Wed Jul 10 16:35:51 2013
@@ -34,8 +34,8 @@ import org.w3c.dom.Document;
 import junit.framework.AssertionFailedError;
 
 import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolTestBase;
 
 import org.junit.After;
@@ -141,7 +141,7 @@ public class AegisTest extends ToolTestB
         XPathUtils xpu = new XPathUtils(getNSMap());
         if (!xpu.isExist(xpathExpression, doc, XPathConstants.NODE)) {
             throw new AssertionFailedError("Failed to select any nodes for expression:\n" + xpathExpression
-                                           + " from document:\n" + XMLUtils.toString(doc));
+                                           + " from document:\n" + StaxUtils.toString(doc));
         }
     }    
 }

Modified: cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java (original)
+++ cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/internal/Stax2DOMTest.java Wed Jul 10 16:35:51 2013
@@ -28,7 +28,8 @@ import java.net.URISyntaxException;
 import org.w3c.dom.Document;
 
 import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -43,7 +44,7 @@ public class Stax2DOMTest extends Assert
     }
 
     public void assertDocumentContent(Document doc) {
-        String content = XMLUtils.toString(doc);
+        String content = StaxUtils.toString(doc);
         assertTrue(
                 content,
                 content.indexOf("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"") != -1);

Modified: cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java (original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxb/CustomizationParser.java Wed Jul 10 16:35:51 2013
@@ -41,7 +41,6 @@ import org.apache.cxf.common.util.String
 import org.apache.cxf.common.util.URIParserUtil;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.resource.URIResolver;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -144,7 +143,7 @@ public final class CustomizationParser {
         InputSource result = null;
         ele.setAttribute("schemaLocation", schemaLoc);
         File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml");
-        XMLUtils.writeTo(ele, new FileOutputStream(tmpFile));
+        StaxUtils.writeTo(ele, new FileOutputStream(tmpFile));
         result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath()));
         tmpFile.deleteOnExit();
         return result;

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -67,7 +67,6 @@ 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;
@@ -810,7 +809,7 @@ public class WSDLToJavaContainer extends
                     updateImports(el, sourceMap);
                     os = new FileWriterUtil(impfile.getParent(), context.get(OutputStreamCreator.class))
                         .getWriter(impfile, "UTF-8");
-                    XMLUtils.writeTo(el, os, 2);
+                    StaxUtils.writeTo(el, os, 2);
                     os.close();
                 }
             }
@@ -828,7 +827,7 @@ public class WSDLToJavaContainer extends
                 updateImports(xsdEle, sourceMap);
             }
             updateWSDLImports(defEle, importWSDLMap);
-            XMLUtils.writeTo(defEle, wsdloutput);
+            StaxUtils.writeTo(defEle, wsdloutput);
             wsdloutput.close();
             
                     
@@ -845,7 +844,7 @@ public class WSDLToJavaContainer extends
                     updateImports(xsdEle, sourceMap);
                 }
                 updateWSDLImports(importEle, importWSDLMap);
-                XMLUtils.writeTo(importEle, wsdlOs);
+                StaxUtils.writeTo(importEle, wsdlOs);
                 wsdlOs.close();
 
             }               

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java (original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java Wed Jul 10 16:35:51 2013
@@ -108,7 +108,6 @@ import org.apache.cxf.common.xmlschema.S
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.resource.URIResolver;
 import org.apache.cxf.service.model.SchemaInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -600,7 +599,7 @@ public class JAXBDataBinding implements 
         InputSource result = null;
         ele.setAttributeNS(null, "schemaLocation", schemaLoc);
         File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml");
-        XMLUtils.writeTo(ele, new FileOutputStream(tmpFile));
+        StaxUtils.writeTo(ele, new FileOutputStream(tmpFile));
         result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath()));
         tmpFile.deleteOnExit();
         return result;

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java (original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java Wed Jul 10 16:35:51 2013
@@ -52,7 +52,6 @@ import org.apache.cxf.common.util.URIPar
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
 import org.apache.cxf.helpers.MapNamespaceContext;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.resource.URIResolver;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -589,7 +588,7 @@ public final class CustomizationParser {
         InputSource result = null;
         ele.setAttributeNS(null, "schemaLocation", schemaLoc);
         File tmpFile = FileUtils.createTempFile("jaxbbinding", ".xml");
-        XMLUtils.writeTo(ele, new FileOutputStream(tmpFile));
+        StaxUtils.writeTo(ele, new FileOutputStream(tmpFile));
         result = new InputSource(URIParserUtil.getAbsoluteURI(tmpFile.getAbsolutePath()));
         tmpFile.deleteOnExit();
         return result;

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java (original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java Wed Jul 10 16:35:51 2013
@@ -27,7 +27,7 @@ import javax.jws.HandlerChain;
 import org.w3c.dom.Element;
 
 import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.helpers.XMLUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.ToolException;
@@ -91,7 +91,7 @@ public class HandlerConfigGenerator exte
         throws ToolException {
         
         try {
-            XMLUtils.generateXMLFile(hChains, writer);
+            StaxUtils.writeTo(hChains, writer, 2);
             writer.close();
         } catch (Exception ex) {
             throw new ToolException(ex);

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/CustomizedWSDLLocator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/CustomizedWSDLLocator.java?rev=1501836&r1=1501835&r2=1501836&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/CustomizedWSDLLocator.java (original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/CustomizedWSDLLocator.java Wed Jul 10 16:35:51 2013
@@ -30,8 +30,8 @@ import org.xml.sax.InputSource;
 
 import org.apache.cxf.catalog.OASISCatalogManager;
 import org.apache.cxf.catalog.OASISCatalogManagerHelper;
-import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.resource.ExtendedURIResolver;
+import org.apache.cxf.staxutils.StaxUtils;
 
 public class CustomizedWSDLLocator implements javax.wsdl.xml.WSDLLocator {
     private String wsdlUrl;
@@ -76,7 +76,7 @@ public class CustomizedWSDLLocator imple
     public InputSource getBaseInputSource() {
         if (elementMap.get(baseUri) != null) {
             Element ele = elementMap.get(baseUri);
-            String content = XMLUtils.toString(ele);
+            String content = StaxUtils.toString(ele);
             InputSource ins = new InputSource(new StringReader(content));
             ins.setSystemId(baseUri);
             return ins;
@@ -108,7 +108,7 @@ public class CustomizedWSDLLocator imple
             
             if (elementMap.get(importURI.toString()) != null) {
                 Element ele = elementMap.get(importURI.toString());
-                String content = XMLUtils.toString(ele);
+                String content = StaxUtils.toString(ele);
 
                 InputSource ins = new InputSource(new StringReader(content));
                 ins.setSystemId(importURI.toString());

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=1501836&r1=1501835&r2=1501836&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 16:35:51 2013
@@ -25,7 +25,6 @@ import org.w3c.dom.Document;
 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;
 
@@ -65,7 +64,7 @@ public class CustomizationParserTest ext
         parser.copyAllJaxbDeclarations(schemaNode, (Element)jaxwsBindingNode);
 
         File file = new File(output, "custom_test.xsd");
-        XMLUtils.writeTo(schemaNode, new FileOutputStream(file));
+        StaxUtils.writeTo(schemaNode, new FileOutputStream(file));
         Document testNode = StaxUtils.read(file);
 
         Node result = selector.queryNode(testNode, checkingPoint);
@@ -81,7 +80,7 @@ public class CustomizationParserTest ext
         parser.internalizeBinding(jaxwsBinding, wsdlDoc, "");
 
         File file = new File(output, "custom_test.wsdl");
-        XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
+        StaxUtils.writeTo(wsdlDoc, new FileOutputStream(file));
         Document testNode = StaxUtils.read(file);
 
         String[] checkingPoints =
@@ -103,7 +102,7 @@ public class CustomizationParserTest ext
             new String[]{base + "jaxb:schemaBindings/jaxb:package"};
 
         File file = new File(output, "custom_test.wsdl");
-        XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
+        StaxUtils.writeTo(wsdlDoc, new FileOutputStream(file));
         Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);
@@ -121,7 +120,7 @@ public class CustomizationParserTest ext
             new String[]{base + "jaxb:globalBindings/jaxb:javaType"};
 
         File file = new File(output, "custom_test.wsdl");
-        XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
+        StaxUtils.writeTo(wsdlDoc, new FileOutputStream(file));
         Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);
@@ -143,7 +142,7 @@ public class CustomizationParserTest ext
             new String[]{checkingPoint};
 
         File file = new File(output, "custom_test4.wsdl");
-        XMLUtils.writeTo(wsdlDoc, new FileOutputStream(file));
+        StaxUtils.writeTo(wsdlDoc, new FileOutputStream(file));
         Document testNode = StaxUtils.read(file);
 
         checking(testNode, checkingPoints);