cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r579093 - /incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
Date Tue, 25 Sep 2007 06:48:51 GMT
Author: ningjiang
Date: Mon Sep 24 23:48:50 2007
New Revision: 579093

URL: http://svn.apache.org/viewvc?rev=579093&view=rev
Log:
CXF-1059 applied the patch for NodeDataReader, thanks Fedor

Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java?rev=579093&r1=579092&r2=579093&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
Mon Sep 24 23:48:50 2007
@@ -19,6 +19,7 @@
 package org.apache.cxf.databinding.source;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.Collection;
 import java.util.logging.Logger;
 
@@ -63,11 +64,12 @@
             }
         } else if (StreamSource.class.isAssignableFrom(type)) {
             try {
-                CachedOutputStream out = new CachedOutputStream();
+                CachedOutputStream out = new CachedOutputStream();                
                 DOMUtils.writeXml(input, out);
+                InputStream is = out.getInputStream();
                 out.close();
                 
-                return new StreamSource(out.getInputStream());
+                return new StreamSource(is);
             } catch (IOException e) {
                 throw new Fault(new Message("COULD_NOT_READ_XML_STREAM", LOG), e);
             } catch (TransformerException e) {



Mime
View raw message