You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2017/06/04 10:22:14 UTC

svn commit: r1797570 - /webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java

Author: veithen
Date: Sun Jun  4 10:22:14 2017
New Revision: 1797570

URL: http://svn.apache.org/viewvc?rev=1797570&view=rev
Log:
Remove usage of StAXUtils.createXMLStreamWriter in samples.

Modified:
    webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java

Modified: webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java?rev=1797570&r1=1797569&r2=1797570&view=diff
==============================================================================
--- webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java (original)
+++ webservices/axiom/trunk/samples/src/test/java/org/apache/axiom/samples/MTOMLogSample.java Sun Jun  4 10:22:14 2017
@@ -22,6 +22,7 @@ import java.io.StringWriter;
 
 import javax.activation.DataHandler;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
@@ -29,7 +30,6 @@ import junit.framework.TestCase;
 
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.commons.logging.Log;
@@ -41,7 +41,7 @@ public class MTOMLogSample extends TestC
     // START SNIPPET: variant2
     private void logMessage(SOAPEnvelope env) throws XMLStreamException {
         StringWriter sw = new StringWriter();
-        XMLStreamWriter writer = new LogWriter(StAXUtils.createXMLStreamWriter(sw));
+        XMLStreamWriter writer = new LogWriter(XMLOutputFactory.newInstance().createXMLStreamWriter(sw));
         env.serialize(writer);
         writer.flush();
         log.info("Message: " + sw.toString());