cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r906420 - /cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Date Thu, 04 Feb 2010 09:45:49 GMT
Author: eglynn
Date: Thu Feb  4 09:45:49 2010
New Revision: 906420

URL: http://svn.apache.org/viewvc?rev=906420&view=rev
Log:
Fix for [CXF-2650] Long schema truncated prior to validation

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=906420&r1=906419&r2=906420&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java Thu Feb  4
09:45:49 2010
@@ -46,6 +46,7 @@
 import javax.xml.bind.Marshaller;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
@@ -626,7 +627,9 @@
                     DOMSource ds = new DOMSource(el, baseURI);   
                     schemaSourcesMap2.put(si.getSystemId() + ":" + si.getNamespaceURI(),
ds);
                     LoadingByteArrayOutputStream out = new LoadingByteArrayOutputStream();
-                    StaxUtils.copy(el, StaxUtils.createXMLStreamWriter(out));
+                    XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(out);
+                    StaxUtils.copy(el, writer);
+                    writer.flush();
                     schemaSourcesMap.put(si.getSystemId() + ":" + si.getNamespaceURI(), out.toByteArray());
                 }
 



Mime
View raw message