Author: veithen
Date: Mon Mar 11 17:59:03 2013
New Revision: 1455263

URL: http://svn.apache.org/r1455263
Log:
Eliminated usage of deprecated Axiom class.

Modified:
    
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
    
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
    
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java

Modified: 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/mtom/EchoService2.java?rev=1455263&r1=1455262&r2=1455263&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/mtom/EchoService2.java
 Mon Mar 11 17:59:03 2013
@@ -22,13 +22,13 @@ package org.apache.axis2.mtom;
 import org.apache.axiom.attachments.Attachments;
 import org.apache.axiom.attachments.IncomingAttachmentInputStream;
 import org.apache.axiom.attachments.IncomingAttachmentStreams;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.axis2.context.MessageContext;
+import org.apache.commons.io.IOUtils;
 
 public class EchoService2 {
 
@@ -41,7 +41,7 @@ public class EchoService2 {
         IncomingAttachmentStreams streams = 
attachments.getIncomingAttachmentStreams();
         IncomingAttachmentInputStream stream = streams.getNextStream();
 
-        byte[] data = IOUtils.getStreamAsByteArray(stream);
+        byte[] data = IOUtils.toByteArray(stream);
 
         //setting response
         OMFactory fac = OMAbstractFactory.getOMFactory();

Modified: 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java?rev=1455263&r1=1455262&r2=1455263&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
 Mon Mar 11 17:59:03 2013
@@ -28,7 +28,6 @@ package org.apache.axis2.rpc.complex;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -38,6 +37,7 @@ import org.apache.axis2.description.Axis
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
+import org.apache.commons.io.IOUtils;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfArrayOfstring;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdateTime;
 import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdecimal;
@@ -377,7 +377,7 @@ public class ComplexDataTypesComplexData
 
         byte[] input = new byte[]{(byte) 0xDE, (byte) 0xAD, (byte) 0xBE, 
(byte) 0xEF};
         DataHandler ret = stub.retByteArray(new DataHandler(new 
ByteArrayDataSource(input)));
-        byte[] bytes = IOUtils.getStreamAsByteArray(ret.getInputStream());
+        byte[] bytes = IOUtils.toByteArray(ret.getInputStream());
         assertTrue(Arrays.equals(bytes, input));
     }
 

Modified: 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java?rev=1455263&r1=1455262&r2=1455263&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesDocLitBareTest.java
 Mon Mar 11 17:59:03 2013
@@ -22,7 +22,6 @@ package org.apache.axis2.rpc.complex;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import org.apache.axiom.attachments.ByteArrayDataSource;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -34,6 +33,7 @@ import org.apache.axis2.description.java
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
+import org.apache.commons.io.IOUtils;
 import org.tempuri.complex.ComplexDataTypesDocLitBareStub;
 import 
org.tempuri.complex.ComplexDataTypesDocLitBareStub.RetArrayString2DResult;
 
@@ -388,7 +388,7 @@ public class ComplexDataTypesDocLitBareT
         ComplexDataTypesDocLitBareStub.RetByteArray req = new 
ComplexDataTypesDocLitBareStub.RetByteArray();
         req.setInByteArray(new DataHandler(new ByteArrayDataSource(input)));
         DataHandler ret = stub.retByteArray(req).get_return();
-        byte[] bytes = IOUtils.getStreamAsByteArray(ret.getInputStream());
+        byte[] bytes = IOUtils.toByteArray(ret.getInputStream());
         assertTrue(Arrays.equals(bytes, input));
     }
 


Reply via email to