You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2006/12/06 06:40:56 UTC

svn commit: r482908 - in /webservices/axis2/trunk/c/axiom/src/parser/libxml2: libxml2_reader_wrapper.c libxml2_writer_wrapper.c

Author: nandika
Date: Tue Dec  5 21:40:52 2006
New Revision: 482908

URL: http://svn.apache.org/viewvc?view=rev&rev=482908
Log:
xmlTextWriterFlush added to fix the problem of file not being able to close

Modified:
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c

Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c?view=diff&rev=482908&r1=482907&r2=482908
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_reader_wrapper.c Tue Dec  5 21:40:52 2006
@@ -306,7 +306,7 @@
         return NULL;
     }
 
-    wrapper_impl->reader =  xmlNewTextReaderFilename(filename);
+	wrapper_impl->reader =  xmlReaderForFile(filename, encoding, XML_PARSE_RECOVER);
     if (!(wrapper_impl->reader))
     {
         AXIS2_FREE(env->allocator, wrapper_impl);

Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c?view=diff&rev=482908&r1=482907&r2=482908
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c Tue Dec  5 21:40:52 2006
@@ -612,6 +612,10 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     writer_impl = AXIS2_INTF_TO_IMPL(writer);
 
+	if(writer_impl->xml_writer){
+		xmlFreeTextWriter(writer_impl->xml_writer);
+		writer_impl->xml_writer = NULL;
+	}
     if (writer_impl->buffer)
     {
         xmlBufferFree(writer_impl->buffer);
@@ -643,8 +647,6 @@
         writer->ops = NULL;
     }
 
-
-
     AXIS2_FREE(env->allocator, writer_impl);
     writer_impl = NULL;
     return AXIS2_SUCCESS;
@@ -1487,15 +1489,18 @@
 {
     axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL;
     writer_impl = AXIS2_INTF_TO_IMPL(writer);
-    if (writer_impl->xml_writer)
+    /*
+	if (writer_impl->xml_writer)
     {
-        xmlFreeTextWriter(writer_impl->xml_writer);
+		xmlFreeTextWriter(writer_impl->xml_writer); 
         writer_impl->xml_writer = NULL;
     }
+	*/
     if (writer_impl->writer_type == AXIS2_XML_PARSER_TYPE_BUFFER)
     {
         axis2_char_t *output = NULL;
-
+		int output_bytes = 0;
+		output_bytes = xmlTextWriterFlush(writer_impl->xml_writer);
         if (writer_impl->buffer)
         {
             output = AXIS2_MALLOC(env->allocator,



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org