Author: veithen
Date: Sun Feb 14 09:14:15 2016
New Revision: 1730300

URL: http://svn.apache.org/viewvc?rev=1730300&view=rev
Log:
Eliminate usage of deprecated Axiom APIs.

Modified:
    
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl.java
    
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/SourceBlockImpl.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl.java?rev=1730300&r1=1730299&r2=1730300&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/DataSourceBlockImpl.java
 Sun Feb 14 09:14:15 2016
@@ -44,7 +44,6 @@ import org.apache.commons.logging.LogFac
 import javax.activation.DataSource;
 import javax.mail.util.ByteArrayDataSource;
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
@@ -151,11 +150,7 @@ public class DataSourceBlockImpl extends
             throws XMLStreamException, WebServiceException {
         try {
             if (busObj instanceof DataSource) {
-                XMLInputFactory f = StAXUtils.getXMLInputFactory();
-
-                XMLStreamReader reader = 
f.createXMLStreamReader(((DataSource)busObj).getInputStream());
-                StAXUtils.releaseXMLInputFactory(f);
-                return reader;
+                return 
StAXUtils.createXMLStreamReader(((DataSource)busObj).getInputStream());
             }
             throw ExceptionFactory.makeWebServiceException(
                     Messages.getMessage("SourceNotSupported", 
busObject.getClass().getName()));

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/SourceBlockImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/SourceBlockImpl.java?rev=1730300&r1=1730299&r2=1730300&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/SourceBlockImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/SourceBlockImpl.java
 Sun Feb 14 09:14:15 2016
@@ -227,9 +227,7 @@ public class SourceBlockImpl extends Blo
             if (busObj instanceof StreamSource) {
                 XMLInputFactory f = StAXUtils.getXMLInputFactory();
 
-                XMLStreamReader reader = 
f.createXMLStreamReader((Source)busObj);
-                StAXUtils.releaseXMLInputFactory(f);
-                return reader;
+                return f.createXMLStreamReader((Source)busObj);
             }
             //TODO: For GM we need to only use this approach when absolutely 
necessary.
             // For example, we don't want to do this if this is a (1.6) 
StaxSource or if the 


Reply via email to