cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r797482 - in /cxf/branches/2.1.x-fixes: ./ distribution/src/main/release/samples/aegis/src/demo/hw/client/ distribution/src/main/release/samples/aegis/src/demo/hw/server/ distribution/src/main/release/samples/mtom/src/demo/mtom/client/ dist...
Date Fri, 24 Jul 2009 14:27:45 GMT
Author: dkulp
Date: Fri Jul 24 14:27:44 2009
New Revision: 797482

URL: http://svn.apache.org/viewvc?rev=797482&view=rev
Log:
Merged revisions 797460 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r797460 | dkulp | 2009-07-24 09:58:18 -0400 (Fri, 24 Jul 2009) | 10 lines
  
  Merged revisions 797232 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r797232 | dkulp | 2009-07-23 17:33:48 -0400 (Thu, 23 Jul 2009) | 2 lines
    
    Fix issues in mtom demo of the streams getting corrupt
    Fix checkstyle issues in aegis demo
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java
    cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/server/HelloWorldImpl.java
    cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
    cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/server/TestMtomPortTypeImpl.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 24 14:27:44 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453
-/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453,797460
+/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231-797232

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java?rev=797482&r1=797481&r2=797482&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java
(original)
+++ cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/client/Client.java
Fri Jul 24 14:27:44 2009
@@ -19,9 +19,11 @@
 
 package demo.hw.client;
 
+
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 
+
 import demo.hw.server.HelloWorld;
 
 public final class Client {

Modified: cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/server/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/server/HelloWorldImpl.java?rev=797482&r1=797481&r2=797482&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/server/HelloWorldImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/aegis/src/demo/hw/server/HelloWorldImpl.java
Fri Jul 24 14:27:44 2009
@@ -24,5 +24,6 @@
         System.out.println("sayHi called");
         return "Hello " + text;
     }
+
 }
 

Modified: cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java?rev=797482&r1=797481&r2=797482&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
(original)
+++ cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
Fri Jul 24 14:27:44 2009
@@ -22,7 +22,6 @@
 import java.awt.Image;
 import java.io.ByteArrayInputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.InputStream;
 import java.net.URI;
 import java.net.URL;
@@ -50,9 +49,6 @@
     }
 
     public static void main(String args[]) throws Exception {
-
-        Client client = new Client();
-
         if (args.length == 0) {
             System.out.println("Please specify the WSDL file.");
             System.exit(1);
@@ -83,7 +79,10 @@
         Holder<byte[]> param = new Holder<byte[]>();
         param.value = new byte[(int) fileSize];
         InputStream in = fileURL.openStream();
-        in.read(param.value);
+        int len = in.read(param.value);
+        while (len < fileSize) {
+            len += in.read(param.value, len, (int)(fileSize - len));
+        }
         System.out.println("--Sending the me.bmp image to server");
         System.out.println("--Sending a name value of " + name.value);
 
@@ -123,8 +122,4 @@
         System.exit(0);
     }
 
-    private static InputStream getResourceStream(File file) throws Exception {
-        InputStream in = new FileInputStream(file);
-        return in;
-    }
 }

Modified: cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/server/TestMtomPortTypeImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/server/TestMtomPortTypeImpl.java?rev=797482&r1=797481&r2=797482&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/server/TestMtomPortTypeImpl.java
(original)
+++ cxf/branches/2.1.x-fixes/distribution/src/main/release/samples/mtom/src/demo/mtom/server/TestMtomPortTypeImpl.java
Fri Jul 24 14:27:44 2009
@@ -18,10 +18,14 @@
  */
 
 package demo.mtom.server;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 
 import javax.activation.DataHandler;
 import javax.jws.WebService;
+import javax.mail.util.ByteArrayDataSource;
 import javax.xml.ws.Holder;
 
 import org.apache.cxf.mime.TestMtomPortType;
@@ -44,12 +48,29 @@
         try {
             System.out.println("Received image with mtom enabled from client");
             InputStream mtomIn = attachinfo.value.getInputStream();
-            long fileSize = 0;
-            System.out.println("The image data size is " + mtomIn.available());
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            copy(mtomIn, out);
+            System.out.println("The image data size is " + out.size());
             name.value = "Hello " + name.value;
             mtomIn.close();
+            attachinfo.value = new DataHandler(new ByteArrayDataSource(out.toByteArray(),
+                                                                       attachinfo.value.getContentType()));
         } catch (Exception e) {
             e.printStackTrace();
         }
     }
+    public static int copy(final InputStream input, final OutputStream output) throws IOException
{
+        final byte[] buffer = new byte[4096];
+        int n = 0;
+        n = input.read(buffer);
+        int total = 0;
+        while (-1 != n) {
+            output.write(buffer, 0, n);
+            total += n;
+            n = input.read(buffer);
+        }
+        return total;
+    }
+    
+    
 }



Mime
View raw message