cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r529849 - /incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java
Date Wed, 18 Apr 2007 03:54:16 GMT
Author: ningjiang
Date: Tue Apr 17 20:54:15 2007
New Revision: 529849

URL: http://svn.apache.org/viewvc?view=rev&rev=529849
Log:
Fixed soap bindings test's build error

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java?view=diff&rev=529849&r1=529848&r2=529849
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestUtil.java
Tue Apr 17 20:54:15 2007
@@ -19,8 +19,6 @@
 
 package org.apache.cxf.binding.soap;
 
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -51,11 +49,8 @@
         xopObj.setName("hello world");        
                 
         URL url1 = clazz.getResource("my.wav");
-        File file = new File(url1.toURI().getPath());
-        FileInputStream fi = new FileInputStream(file);
-        byte[] buffer = new byte[(int) file.length()];
-        fi.read(buffer);
-        xopObj.setAttachinfo(buffer);
+        
+        xopObj.setAttachinfo(new DataHandler(url1));
         
         return xopObj;        
     }



Mime
View raw message