axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r372721 - in /webservices/axis2/trunk/c: include/ modules/core/receivers/ modules/core/transport/http/ modules/xml/om/ modules/xml/parser/ modules/xml/parser/guththila/ modules/xml/parser/libxml2/ modules/xml/soap/ test/server/math/ test/un...
Date Fri, 27 Jan 2006 04:00:57 GMT
Author: nandika
Date: Thu Jan 26 20:00:24 2006
New Revision: 372721

URL: http://svn.apache.org/viewcvs?rev=372721&view=rev
Log:
AXIS2_OM_NODE_ADD_CHILD parameter mixup resolved , loging added , close_input_callback function
added to xml_reader

Modified:
    webservices/axis2/trunk/c/include/axis2_om_node.h
    webservices/axis2/trunk/c/include/axis2_soap_builder.h
    webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
    webservices/axis2/trunk/c/modules/xml/om/om_comment.c
    webservices/axis2/trunk/c/modules/xml/om/om_doctype.c
    webservices/axis2/trunk/c/modules/xml/om/om_document.c
    webservices/axis2/trunk/c/modules/xml/om/om_element.c
    webservices/axis2/trunk/c/modules/xml/om/om_node.c
    webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c
    webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
    webservices/axis2/trunk/c/modules/xml/om/om_text.c
    webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_reader.h
    webservices/axis2/trunk/c/modules/xml/parser/guththila/guththila_xml_reader_wrapper.c
    webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_reader_wrapper.c
    webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c
    webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_fault_sub_code.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c
    webservices/axis2/trunk/c/test/server/math/Makefile
    webservices/axis2/trunk/c/test/unit/xml/om/om_node_test.c
    webservices/axis2/trunk/c/test/xml/om/test_om.c
    webservices/axis2/trunk/c/test/xml/soap/Makefile.am
    webservices/axis2/trunk/c/test/xml/soap/test_soap.c

Modified: webservices/axis2/trunk/c/include/axis2_om_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_node.h?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_node.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_node.h Thu Jan 26 20:00:24 2006
@@ -89,14 +89,14 @@
                                         axis2_env_t **env);
     /**
     * Adds given node as child to parent
-    * @param om_node child node. cannot be NULL.
+    * @param om_node parent node. cannot be NULL.
     * @param env Environment. MUST NOT be NULL, .
     * @param child child node.
     * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE
     */
     axis2_status_t (AXIS2_CALL *add_child) (axis2_om_node_t* om_node,
                                             axis2_env_t **env,
-                                            axis2_om_node_t  *parent);
+                                            axis2_om_node_t *child);
 
     /**
     * Detaches given node from the parent and reset the links

Modified: webservices/axis2/trunk/c/include/axis2_soap_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_builder.h?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_builder.h Thu Jan 26 20:00:24 2006
@@ -93,7 +93,7 @@
                                           (axis2_soap_builder_t *builder,
                                            axis2_env_t **env,
                                            axis2_om_node_t *om_node,
-                                           axis2_bool_t *is_soap_element);
+                                           axis2_bool_t is_soap_element);
 };
                                                       
 

Modified: webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c (original)
+++ webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c Thu Jan 26
20:00:24 2006
@@ -226,7 +226,7 @@
         body_content_element = axis2_om_element_create(env, NULL, res_name, 
             ns, &body_content_node);
         
-        AXIS2_OM_NODE_ADD_CHILD(result_node, env, body_content_node);
+        AXIS2_OM_NODE_ADD_CHILD(body_content_node, env, result_node);
         
     }
     else
@@ -256,7 +256,7 @@
         return AXIS2_FAILURE;
     }
 
-    AXIS2_OM_NODE_ADD_CHILD(body_content_node, env, out_node);
+    AXIS2_OM_NODE_ADD_CHILD(out_node , env ,body_content_node);
 
     return AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(new_msg_ctx, env, default_envelope);
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Thu Jan 26
20:00:24 2006
@@ -148,7 +148,7 @@
 	
 	char_set = axis2_http_transport_utils_get_charset_enc(env,content_type);
 	xml_reader = axis2_xml_reader_create_for_memory(env, 
-						axis2_http_transport_utils_on_data_request, 
+						axis2_http_transport_utils_on_data_request,NULL, 
 						(void *)&callback_ctx, char_set);
 	if(NULL == xml_reader)
 	{

Modified: webservices/axis2/trunk/c/modules/xml/om/om_comment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_comment.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_comment.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_comment.c Thu Jan 26 20:00:24 2006
@@ -98,7 +98,7 @@
     if (parent)
     {
         AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
-        AXIS2_OM_NODE_ADD_CHILD((*node), env, parent); 
+        AXIS2_OM_NODE_ADD_CHILD(parent, env, (*node)); 
     }
 
     /* ops */

Modified: webservices/axis2/trunk/c/modules/xml/om/om_doctype.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_doctype.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_doctype.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_doctype.c Thu Jan 26 20:00:24 2006
@@ -99,7 +99,7 @@
     if (parent)
     {
         AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
-        AXIS2_OM_NODE_ADD_CHILD((*node), env, parent);
+        AXIS2_OM_NODE_ADD_CHILD(parent, env, (*node));
     }
 
     /* ops */

Modified: webservices/axis2/trunk/c/modules/xml/om/om_document.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_document.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_document.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_document.c Thu Jan 26 20:00:24 2006
@@ -208,8 +208,7 @@
     if (document_impl->root_element && child)
     {
         
-        return AXIS2_OM_NODE_ADD_CHILD (child, env,
-                                        document_impl->last_child);
+        return AXIS2_OM_NODE_ADD_CHILD (document_impl->last_child, env, child);
     }
     return AXIS2_FAILURE;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_element.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_element.c Thu Jan 26 20:00:24 2006
@@ -232,7 +232,7 @@
     if (parent)
     {
         AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
-        AXIS2_OM_NODE_ADD_CHILD((*node), env, parent);
+        AXIS2_OM_NODE_ADD_CHILD(parent, env, (*node));
     }
     
     AXIS2_OM_NODE_SET_BUILD_STATUS((*node), env, AXIS2_FALSE);
@@ -1122,7 +1122,7 @@
     temp_node = NULL;
        
     om_text = axis2_om_text_create(env, NULL, text, &temp_node);
-    AXIS2_OM_NODE_ADD_CHILD(temp_node, env, element_node);
+    AXIS2_OM_NODE_ADD_CHILD(element_node, env, temp_node);
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/om/om_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_node.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_node.c Thu Jan 26 20:00:24 2006
@@ -34,7 +34,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_om_node_add_child (axis2_om_node_t *om_node,
                          axis2_env_t **env,
-                         axis2_om_node_t * parent);
+                         axis2_om_node_t * child);
                               
 axis2_om_node_t * AXIS2_CALL 
 axis2_om_node_detach (axis2_om_node_t *om_node,
@@ -331,26 +331,26 @@
 axis2_status_t AXIS2_CALL 
 axis2_om_node_add_child (axis2_om_node_t *om_node,
                          axis2_env_t **env,
-                         axis2_om_node_t *parent)
+                         axis2_om_node_t *child)
 {
     AXIS2_FUNC_PARAM_CHECK(om_node,env,AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, parent, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, child, AXIS2_FAILURE);
 
-    if (AXIS2_INTF_TO_IMPL(parent)->first_child  == NULL)
+    if (AXIS2_INTF_TO_IMPL(om_node)->first_child  == NULL)
     {
-        AXIS2_INTF_TO_IMPL(parent)->first_child = om_node;
+        AXIS2_INTF_TO_IMPL(om_node)->first_child = child;
     }
     else
     {
        axis2_om_node_t *last_sib = NULL;
-       last_sib  = AXIS2_INTF_TO_IMPL(parent)->last_child;
+       last_sib  = AXIS2_INTF_TO_IMPL(om_node)->last_child;
        if(last_sib)
-           AXIS2_INTF_TO_IMPL(last_sib)->next_sibling = om_node;
-        AXIS2_INTF_TO_IMPL(om_node)->prev_sibling = last_sib;
+           AXIS2_INTF_TO_IMPL(last_sib)->next_sibling = child;
+        AXIS2_INTF_TO_IMPL(child)->prev_sibling = last_sib;
     }
 
-    AXIS2_INTF_TO_IMPL(om_node)->parent  = parent;
-    AXIS2_INTF_TO_IMPL(parent)->last_child = om_node;
+    AXIS2_INTF_TO_IMPL(child)->parent  = om_node;
+    AXIS2_INTF_TO_IMPL(om_node)->last_child = child;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c Thu Jan 26 20:00:24
2006
@@ -126,7 +126,7 @@
     if (parent)
     {
         AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
-        AXIS2_OM_NODE_ADD_CHILD((*node), env, parent); 
+        AXIS2_OM_NODE_ADD_CHILD(parent, env, (*node)); 
     }
 
     /* ops */

Modified: webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c Thu Jan 26 20:00:24 2006
@@ -259,6 +259,9 @@
     {
         AXIS2_ERROR_SET((*env)->error, 
                          AXIS2_ERROR_INVALID_BUILDER_STATE_LAST_NODE_NULL,AXIS2_FAILURE);
+        AXIS2_LOG_WRITE((*env)->log, 
+            "AXIS2_ERROR_INVALID_BUILDER_STATE_LAST_NODE_NULL creating a text node without
a parent", 
+            AXIS2_LOG_CRITICAL);
         return NULL;
     }
     temp_value = AXIS2_XML_READER_GET_VALUE (builder->parser, env);
@@ -266,6 +269,7 @@
     if (!temp_value)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_XML_READER_VALUE_NULL, AXIS2_FAILURE);
+        AXIS2_LOG_WRITE((*env)->log,"XML_READER RETURNED NULL VALUE CREATING OM TEXT",
 AXIS2_LOG_CRITICAL);
         return NULL;
     }
   
@@ -274,7 +278,7 @@
         axis2_om_text_create (env, 
                               AXIS2_OM_NODE_GET_PARENT(builder->lastnode, env),
                               temp_value, &node);
-
+  
     }
     else
     {
@@ -308,6 +312,7 @@
     {
         AXIS2_ERROR_SET((*env)->error,
                 AXIS2_ERROR_INVALID_BUILDER_STATE_CANNOT_DISCARD, AXIS2_FAILURE);
+              
         return AXIS2_FAILURE;
     }
 
@@ -430,6 +435,9 @@
         {
             AXIS2_ERROR_SET((*env)->error,
             AXIS2_ERROR_INVALID_DOCUMENT_STATE_UNDEFINED_NAMESPACE, AXIS2_FAILURE);
+            AXIS2_LOG_WRITE((*env)->log, 
+                "AXIS2_ERROR_INVALID_DOCUMENT_STATE_UNDEFINED_NAMESPACE", AXIS2_LOG_CRITICAL);
+            
              return AXIS2_FAILURE;
         }
     }
@@ -451,6 +459,8 @@
 
     if (!temp_localname)
     {
+        AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_XML_READER_ELEMENT_NULL localname null",
+            AXIS2_LOG_CRITICAL);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_XML_READER_ELEMENT_NULL, AXIS2_FAILURE);

         return NULL;
     }
@@ -689,12 +699,16 @@
     {
         if (builder_impl->done)
         {
+            AXIS2_LOG_WRITE((*env)->log,
+                "AXIS2_ERROR_BUILDER_DONE_CANNOT_PULL either the xml is over or a critical
error occured",
+                AXIS2_LOG_INFO);
+            
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_BUILDER_DONE_CANNOT_PULL, AXIS2_FAILURE);
             return NULL;
         }
 
         token = AXIS2_XML_READER_NEXT (builder_impl->parser, env);
-
+        
         if(token == -1)
             return NULL;
 
@@ -883,12 +897,18 @@
     
     if (builder_impl->done)
     {
+        AXIS2_LOG_WRITE((*env)->log,
+                "AXIS2_ERROR_BUILDER_DONE_CANNOT_PULL either the xml is over or a critical
error occured",
+                AXIS2_LOG_INFO);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_BUILDER_DONE_CANNOT_PULL, AXIS2_FAILURE);
         return -1;
     }
     token = AXIS2_XML_READER_NEXT (builder_impl->parser, env);
     if(token == -1)
     {
+        AXIS2_LOG_WRITE((*env)->log,
+                "AXIS2_XML_READER_RETURNED AN ERROR either the xml is over or a critical
error occured",
+                AXIS2_LOG_CRITICAL);
         builder_impl->done = AXIS2_TRUE;
         return -1;
     }
@@ -901,20 +921,27 @@
     switch (token)
     {
         case AXIS2_XML_READER_START_DOCUMENT:
+            AXIS2_LOG_WRITE((*env)->log, " start of xml document START_DOCUMENT_EVENT",
+                AXIS2_LOG_DEBUG);
         /*Do nothing */
         break;
         
         case AXIS2_XML_READER_START_ELEMENT:
             axis2_om_stax_builder_create_om_element (
                         builder, env); 
+          AXIS2_LOG_WRITE((*env)->log, "AXIS2_XML_READER_START_ELEMENT",
+                AXIS2_LOG_DEBUG);
             break;
         
         case AXIS2_XML_READER_EMPTY_ELEMENT:
              axis2_om_stax_builder_create_om_element (
                         builder, env);
-        
+         AXIS2_LOG_WRITE((*env)->log, "AXIS2_XML_READER_EMPTY_ELEMENT",
+                AXIS2_LOG_DEBUG);
         case AXIS2_XML_READER_END_ELEMENT:
             axis2_om_stax_builder_end_element (builder, env);
+         AXIS2_LOG_WRITE((*env)->log, "AXIS2_XML_READER_END_ELEMENT",
+                AXIS2_LOG_DEBUG);
             break;
         
         
@@ -924,6 +951,8 @@
         
         case AXIS2_XML_READER_CHARACTER:
             axis2_om_stax_builder_create_om_text(builder, env);
+         AXIS2_LOG_WRITE((*env)->log, "AXIS2_XML_READER_CHARACTER",
+                AXIS2_LOG_DEBUG);
             break;
                 
         case AXIS2_XML_READER_ENTITY_REFERANCE:

Modified: webservices/axis2/trunk/c/modules/xml/om/om_text.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_text.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_text.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_text.c Thu Jan 26 20:00:24 2006
@@ -107,7 +107,7 @@
     if (parent && AXIS2_OM_NODE_GET_NODE_TYPE(parent, env) == AXIS2_OM_ELEMENT)
     {
         AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
-        AXIS2_OM_NODE_ADD_CHILD ( *node, env, parent);
+        AXIS2_OM_NODE_ADD_CHILD (parent, env, (*node));
     }
 
     /* ops */

Modified: webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_reader.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_reader.h?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_reader.h (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_reader.h Thu Jan 26 20:00:24 2006
@@ -302,6 +302,7 @@
 AXIS2_DECLARE(axis2_xml_reader_t *)
 axis2_xml_reader_create_for_memory(axis2_env_t **env,
                                     int (*read_input_callback)(char *buffer,int size,void*
ctx),
+                                    int (*close_input_callback)(void *ctx),
                                     void *ctx,
                                     const axis2_char_t *encoding);
                                     

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/guththila_xml_reader_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/guththila_xml_reader_wrapper.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/guththila_xml_reader_wrapper.c
(original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/guththila_xml_reader_wrapper.c
Thu Jan 26 20:00:24 2006
@@ -249,6 +249,7 @@
 AXIS2_DECLARE(axis2_xml_reader_t *)
 axis2_xml_reader_create_for_memory(axis2_env_t **env,
                                     int (*read_input_callback)(char *buffer,int size,void*
ctx),
+                                    int (*close_input_callback)(void *ctx),
                                     void *ctx,
                                     const char *encoding)
 {

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_reader_wrapper.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_reader_wrapper.c Thu
Jan 26 20:00:24 2006
@@ -116,7 +116,8 @@
                                                  char *buffer,
                                                  int size);                             
             
                                                  
-
+static int 
+axis2_libxml2_reader_wrapper_close_input_callback(void *ctx);
                                    
 /************* End function parameters , axis2_libxml2_reader_wrapper_impl_t struct ***/
 
@@ -139,6 +140,8 @@
     /******************************************/
     /* read callback function */
     int (*read_input_callback)(char *buffer, int size,void* ctx);
+
+    int (*close_input_callback)(void *ctx);
     
 } axis2_libxml2_reader_wrapper_impl_t;
 
@@ -298,6 +301,7 @@
 AXIS2_DECLARE(axis2_xml_reader_t *)
 axis2_xml_reader_create_for_memory(axis2_env_t **env,
                                     int (*read_input_callback)(char *buffer,int size,void
*ctx),
+                                    int (*close_input_callback)(void *ctx),
                                     void* ctx,
                                     const axis2_char_t *encoding)
 {
@@ -312,12 +316,21 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;   
     }
-    
+    wrapper_impl->close_input_callback = NULL;
+    wrapper_impl->read_input_callback = NULL;
     wrapper_impl->read_input_callback = read_input_callback;
+    wrapper_impl->close_input_callback = close_input_callback;
     wrapper_impl->ctx = ctx;
-    wrapper_impl->reader =  xmlReaderForIO(axis2_libxml2_reader_wrapper_read_input_callback,
-             NULL, wrapper_impl, NULL, encoding, XML_PARSE_RECOVER);
-    
+    if(wrapper_impl->close_input_callback)
+    {
+        wrapper_impl->reader =  xmlReaderForIO(axis2_libxml2_reader_wrapper_read_input_callback,
+             axis2_libxml2_reader_wrapper_close_input_callback, wrapper_impl, NULL, encoding,
XML_PARSE_RECOVER);
+    }
+    else
+    {
+         wrapper_impl->reader =  xmlReaderForIO(axis2_libxml2_reader_wrapper_read_input_callback,
+                             NULL, wrapper_impl, NULL, encoding, XML_PARSE_RECOVER);
+    }
     if(!(wrapper_impl->reader))
     {
         AXIS2_FREE((*env)->allocator, wrapper_impl);
@@ -411,7 +424,16 @@
     }
     */
     ret_val = xmlTextReaderRead(parser_impl->reader);
-    
+    if(ret_val == 0)
+    {
+        AXIS2_LOG_WRITE((*env)->log,"xml stream is over ", AXIS2_LOG_INFO);
+    }
+    if(ret_val == -1)
+    {
+        AXIS2_LOG_WRITE((*env)->log,"critical error occured in xml reader", AXIS2_LOG_CRITICAL);
+        return -1;
+    }
+   
     if(ret_val == 1)
     {
         node = xmlTextReaderNodeType(parser_impl->reader);
@@ -786,6 +808,42 @@
                                            int severities,
                                            void *locator_ptr)
 {
-    printf("%s", msg);
-    
+    axis2_env_t *env = NULL;
+    env = (axis2_env_t*)arg;
+    axis2_char_t error_msg[200];        
+    switch(severities)
+    {
+        case XML_PARSER_SEVERITY_VALIDITY_WARNING :
+        {
+            sprintf(error_msg, "%s -- VALIDITY WARNTING", msg);            
+            AXIS2_LOG_WRITE(env->log, error_msg, AXIS2_LOG_CRITICAL);
+        }
+            break;
+        case XML_PARSER_SEVERITY_VALIDITY_ERROR:
+        {
+            sprintf(error_msg, "%s -- VALIDITY ERROR", msg);            
+            AXIS2_LOG_WRITE(env->log, error_msg, AXIS2_LOG_CRITICAL);
+        }
+            break;
+        case XML_PARSER_SEVERITY_WARNING:
+        {
+            sprintf(error_msg, "%s -- SEVERITY_WARNING", msg);            
+            AXIS2_LOG_WRITE(env->log, error_msg, AXIS2_LOG_CRITICAL);
+        }
+            break;
+        case XML_PARSER_SEVERITY_ERROR:
+        {
+            sprintf(error_msg, "%s -- SEVERITY_ERROR", msg);            
+            AXIS2_LOG_WRITE(env->log, error_msg, AXIS2_LOG_CRITICAL);
+        }
+            break;
+        default:
+            break;
+     }
+}
+
+static int
+axis2_libxml2_reader_wrapper_close_input_callback(void *ctx)
+{
+    return ((axis2_libxml2_reader_wrapper_impl_t*)ctx)->close_input_callback(((axis2_libxml2_reader_wrapper_impl_t*)ctx)->ctx);
 }

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap11_builder_helper.c Thu Jan 26 20:00:24
2006
@@ -279,7 +279,7 @@
         
         if(!parent_localname)
             return AXIS2_FAILURE;
-        if(AXIS2_STRCMP(parent_localname, AXIS2_ERROR_SOAP_FAULT_ROLE_ELEMENT_SHOULD_HAVE_A_TEXT)
== 0)
+        if(AXIS2_STRCMP(parent_localname, AXIS2_SOAP12_SOAP_FAULT_ROLE_LOCAL_NAME) == 0)
         {
             AXIS2_ERROR_SET((*env)->error, 
                 AXIS2_ERROR_SOAP11_FAULT_ACTOR_SHOULD_NOT_HAVE_CHILD_ELEMENTS, AXIS2_FAILURE);

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap12_builder_helper.c Thu Jan 26 20:00:24
2006
@@ -187,6 +187,8 @@
             if(builder_helper_impl->code_present)
             {
                 AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED,
AXIS2_FAILURE);
+                AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_MULTIPLE_CODE_ELEMENTS_ENCOUNTERED",
AXIS2_LOG_CRITICAL);
+                
                 return AXIS2_FAILURE;
             }else
             {
@@ -212,6 +214,8 @@
                     {
                         AXIS2_ERROR_SET((*env)->error, 
                             AXIS2_ERROR_MULTIPLE_REASON_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
+                            
+                       AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_MULTIPLE_REASON_ELEMENTS_ENCOUNTERED",AXIS2_LOG_CRITICAL);
                         return AXIS2_FAILURE;
                     }
                     else
@@ -232,6 +236,7 @@
                 {
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED, AXIS2_FAILURE);
+                        AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED",AXIS2_LOG_CRITICAL);
                     return AXIS2_FAILURE;                        
                 }
             }
@@ -241,12 +246,14 @@
                 {
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE, AXIS2_FAILURE);
+                    AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE",AXIS2_LOG_CRITICAL);
                     return AXIS2_FAILURE;                            
                 }
                 else
                 {
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE, AXIS2_FAILURE);
+                     AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_SOAP_FAULT_CODE_DOES_NOT_HAVE_A_VALUE",
AXIS2_LOG_CRITICAL);
                     return AXIS2_FAILURE;                
                 }
             }
@@ -263,6 +270,7 @@
                     {
                         AXIS2_ERROR_SET((*env)->error, 
                             AXIS2_ERROR_MULTIPLE_NODE_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
+                        AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_MULTIPLE_NODE_ELEMENTS_ENCOUNTERED",AXIS2_LOG_CRITICAL);
                         return AXIS2_FAILURE;
                     }
                     else
@@ -279,6 +287,9 @@
                 {
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED, AXIS2_FALSE);
+                    
+                    AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED",AXIS2_LOG_CRITICAL);
+
                     return AXIS2_FAILURE;                
                 }
             }
@@ -286,6 +297,7 @@
             {       
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_SOAP_FAULT_REASON_ELEMENT_SHOULD_HAVE_A_TEXT, AXIS2_FALSE);
+                     AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED",
AXIS2_LOG_CRITICAL);
                     return AXIS2_FAILURE;                        
             }
             
@@ -317,12 +329,15 @@
                 {
                     AXIS2_ERROR_SET((*env)->error, 
                         AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED, AXIS2_FAILURE);
+                    AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED",AXIS2_LOG_CRITICAL);
                     return AXIS2_FAILURE;                        
                 }
             }
             else
             {
+                
                 AXIS2_ERROR_SET((*env)->error,  AXIS2_ERROR_SOAP_FAULT_ROLE_ELEMENT_SHOULD_HAVE_A_TEXT,
AXIS2_FAILURE);
+                AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_SOAP_FAULT_ROLE_ELEMENT_SHOULD_HAVE_A_TEXT",
AXIS2_LOG_CRITICAL);                
             }
         }
         else if(AXIS2_STRCMP(ele_localname, AXIS2_SOAP12_SOAP_FAULT_DETAIL_LOCAL_NAME) ==
0)
@@ -351,6 +366,8 @@
                 else
                 {
                     AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED,
AXIS2_FAILURE);
+                    AXIS2_LOG_WRITE((*env)->log, "AXIS2_ERROR_WRONG_ELEMENT_ORDER_ENCOUNTERED",
AXIS2_LOG_CRITICAL);
+                    
                     return AXIS2_FAILURE;
                     
                 }

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_body.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_body.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_body.c Thu Jan 26 20:00:24 2006
@@ -269,6 +269,18 @@
     {
         return body_impl->soap_fault;
     }
+    else if(body_impl->soap_builder != NULL)
+    {
+        while(!(body_impl->soap_fault) && !(AXIS2_OM_NODE_GET_BUILD_STATUS(body_impl->om_ele_node,
env)))
+        {
+            int status = AXIS2_SUCCESS;
+            status = AXIS2_SOAP_BUILDER_NEXT(body_impl->soap_builder, env);
+            if(status == AXIS2_FAILURE)
+                return NULL;
+        }
+    }
+    
+    /*
     else
     {
         axis2_om_node_t *first_node = NULL;
@@ -296,7 +308,8 @@
                 return body_impl->soap_fault;                            
             }                 
         }
-    } 
+    }
+    */
     return NULL;
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Thu Jan 26 20:00:24 2006
@@ -569,7 +569,7 @@
     return status;
 }
 
-axis2_status_t 
+axis2_status_t AXIS2_CALL 
 axis2_soap_builder_process_namespace_data
                                 (axis2_soap_builder_t *builder,
                                  axis2_env_t **env,

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_detail.c Thu Jan 26 20:00:24 2006
@@ -217,7 +217,7 @@
         return AXIS2_FAILURE;                
     }
 
-    AXIS2_OM_NODE_ADD_CHILD(node, env, fault_detail_impl->om_ele_node);    
+    AXIS2_OM_NODE_ADD_CHILD(fault_detail_impl->om_ele_node,env, node);    
     return AXIS2_SUCCESS;
 }
                             

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_sub_code.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_sub_code.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_sub_code.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_sub_code.c Thu Jan 26 20:00:24 2006
@@ -201,7 +201,6 @@
     axis2_soap_fault_sub_code_impl_t *fault_sub_code_impl = NULL;
     AXIS2_FUNC_PARAM_CHECK(fault_sub_code, env, AXIS2_FAILURE);
     fault_sub_code_impl = AXIS2_INTF_TO_IMPL(fault_sub_code);
-    
     if(fault_sub_code_impl->value)
     {
         AXIS2_SOAP_FAULT_VALUE_FREE(fault_sub_code_impl->value, env);

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_utils.c Thu Jan 26 20:00:24 2006
@@ -69,7 +69,7 @@
         AXIS2_OM_NODE_FREE_TREE(*my_node, env);
     }
     if(parent && new_node)
-        AXIS2_OM_NODE_ADD_CHILD(new_node, env, parent); 
+        AXIS2_OM_NODE_ADD_CHILD(parent, env, new_node); 
     *my_node = new_node; 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/test/server/math/Makefile
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/server/math/Makefile?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/server/math/Makefile (original)
+++ webservices/axis2/trunk/c/test/server/math/Makefile Thu Jan 26 20:00:24 2006
@@ -83,18 +83,18 @@
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = ${SHELL} /home/samisa/axis2/c/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /home/nandika/axis2/c/missing --run aclocal-1.9
 AMDEP_FALSE = #
 AMDEP_TRUE = 
-AMTAR = ${SHELL} /home/samisa/axis2/c/missing --run tar
+AMTAR = ${SHELL} /home/nandika/axis2/c/missing --run tar
 AR = ar
-AUTOCONF = ${SHELL} /home/samisa/axis2/c/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/samisa/axis2/c/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/samisa/axis2/c/missing --run automake-1.9
+AUTOCONF = ${SHELL} /home/nandika/axis2/c/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/nandika/axis2/c/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/nandika/axis2/c/missing --run automake-1.9
 AWK = gawk
 CC = gcc
 CCDEPMODE = depmode=gcc3
-CFLAGS = -g3 -O0 -ansi -Wall -D_LARGEFILE64_SOURCE -g
+CFLAGS = -g -O2 -ansi -Wall -D_LARGEFILE64_SOURCE -g
 CPP = gcc -E
 CPPFLAGS = 
 CXX = g++
@@ -110,8 +110,8 @@
 ECHO_T = 
 EGREP = grep -E
 EXEEXT = 
-F77 = 
-FFLAGS = 
+F77 = f95
+FFLAGS = -g -O2
 GUTHTHILA = 
 GUTHTHILA_LIBNAME = 
 INSTALL_DATA = ${INSTALL} -m 644
@@ -126,7 +126,7 @@
 LIBXML2_LIBNAME = -lxml2
 LN_S = ln -s
 LTLIBOBJS = 
-MAKEINFO = ${SHELL} /home/samisa/axis2/c/missing --run makeinfo
+MAKEINFO = ${SHELL} /home/nandika/axis2/c/missing --run makeinfo
 OBJEXT = o
 PACKAGE = axis2
 PACKAGE_BUGREPORT = 
@@ -143,7 +143,7 @@
 ac_ct_AR = ar
 ac_ct_CC = gcc
 ac_ct_CXX = g++
-ac_ct_F77 = 
+ac_ct_F77 = f95
 ac_ct_RANLIB = ranlib
 ac_ct_STRIP = strip
 am__fastdepCC_FALSE = #
@@ -170,14 +170,14 @@
 host_vendor = redhat
 includedir = ${prefix}/include
 infodir = ${prefix}/info
-install_sh = /home/samisa/axis2/c/install-sh
+install_sh = /home/nandika/axis2/c/install-sh
 libdir = ${exec_prefix}/lib
 libexecdir = ${exec_prefix}/libexec
 localstatedir = ${prefix}/var
 mandir = ${prefix}/man
 mkdir_p = mkdir -p --
 oldincludedir = /usr/include
-prefix = /home/samisa/axis2/c/deploy
+prefix = /home/nandika/axis2/c/deploy
 program_transform_name = s,x,x,
 sbindir = ${exec_prefix}/sbin
 sharedstatedir = ${prefix}/com

Modified: webservices/axis2/trunk/c/test/unit/xml/om/om_node_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/xml/om/om_node_test.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/unit/xml/om/om_node_test.c (original)
+++ webservices/axis2/trunk/c/test/unit/xml/om/om_node_test.c Thu Jan 26 20:00:24 2006
@@ -14,7 +14,7 @@
     parent = axis2_om_node_create(&env);   
     child  = axis2_om_node_create(&env); 
     
-    AXIS2_OM_NODE_ADD_CHILD(child, &env, parent);
+    AXIS2_OM_NODE_ADD_CHILD(parent, &env, child);
     actual = AXIS2_OM_NODE_GET_FIRST_CHILD(parent, &env);
     CuAssertPtrEquals(tc, child, actual);  
     /*axis2_env_free(env); */
@@ -54,7 +54,7 @@
     child  = axis2_om_node_create(&env);
     sibling = axis2_om_node_create(&env);
 
-    AXIS2_OM_NODE_ADD_CHILD(child, &env, parent);
+    AXIS2_OM_NODE_ADD_CHILD(parent,  &env, child);
     AXIS2_OM_NODE_INSERT_SIBLING_BEFORE(child, &env, sibling);
     
     CuAssertPtrEquals(tc, sibling,AXIS2_OM_NODE_GET_FIRST_CHILD(parent, &env));    
@@ -74,7 +74,7 @@
     child  = axis2_om_node_create(&env);
     sibling = axis2_om_node_create(&env);
 
-    AXIS2_OM_NODE_ADD_CHILD(child, &env, parent);
+    AXIS2_OM_NODE_ADD_CHILD(parent, &env, child);
     AXIS2_OM_NODE_INSERT_SIBLING_AFTER(child, &env, sibling);
     
     CuAssertPtrEquals(tc, sibling,AXIS2_OM_NODE_GET_NEXT_SIBLING(child, &env));
@@ -98,9 +98,9 @@
     sibling2 = axis2_om_node_create(&env);
     
     
-    AXIS2_OM_NODE_ADD_CHILD(child, &env, parent);
-    AXIS2_OM_NODE_ADD_CHILD(sibling1, &env, parent);
-    AXIS2_OM_NODE_ADD_CHILD(sibling2, &env, parent);
+    AXIS2_OM_NODE_ADD_CHILD(parent, &env, child);
+    AXIS2_OM_NODE_ADD_CHILD(parent, &env, sibling1);
+    AXIS2_OM_NODE_ADD_CHILD(parent, &env, sibling2);
 
     CuAssertPtrEquals(tc, sibling1, AXIS2_OM_NODE_GET_NEXT_SIBLING(child, &env));
 

Modified: webservices/axis2/trunk/c/test/xml/om/test_om.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/xml/om/test_om.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/om/test_om.c (original)
+++ webservices/axis2/trunk/c/test/xml/om/test_om.c Thu Jan 26 20:00:24 2006
@@ -63,7 +63,7 @@
         return -1;
       
     /** create pull parser */
-     reader = axis2_xml_reader_create_for_memory(&environment, read_input, NULL, NULL);
+     reader = axis2_xml_reader_create_for_memory(&environment, read_input,NULL ,NULL,
NULL);
     
     if(!reader)
     {

Modified: webservices/axis2/trunk/c/test/xml/soap/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/xml/soap/Makefile.am?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/soap/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/xml/soap/Makefile.am Thu Jan 26 20:00:24 2006
@@ -9,7 +9,7 @@
                     -laxis2_om \
                     -laxis2_soap \
                     -laxis2_util \
-                    -laxis2_parser \
+                    -laxis2_libxml2 \
                     -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME) \
                     -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME)
                     

Modified: webservices/axis2/trunk/c/test/xml/soap/test_soap.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/xml/soap/test_soap.c?rev=372721&r1=372720&r2=372721&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/soap/test_soap.c (original)
+++ webservices/axis2/trunk/c/test/xml/soap/test_soap.c Thu Jan 26 20:00:24 2006
@@ -27,6 +27,11 @@
     return fread(buffer, sizeof(char), size, f); 
 }
 
+int close_soap(void *ctx)
+{
+    fclose(f);
+}
+
 int printnode(axis2_om_node_t *om_node, axis2_env_t **env)
 {
     axis2_om_element_t *om_ele = NULL;
@@ -75,7 +80,7 @@
     if(!f)
         return -1;
     
-    xml_reader = axis2_xml_reader_create_for_memory(env, read_soap, NULL, NULL);
+    xml_reader = axis2_xml_reader_create_for_memory(env, read_soap,close_soap ,NULL, NULL);
     
     om_builder = axis2_om_stax_builder_create(env, xml_reader);
     
@@ -91,7 +96,7 @@
     soap_envelope = AXIS2_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder, env);
     om_node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(soap_envelope, env);
     printnode(om_node, env);
-
+/*
     soap_header = AXIS2_SOAP_ENVELOPE_GET_HEADER(soap_envelope, env);
     if(soap_header)
     {
@@ -124,8 +129,7 @@
         return AXIS2_FAILURE;
     }
     AXIS2_SOAP_BODY_BUILD(soap_body, env);
-    
-    /*
+  */  
 
     while(!(AXIS2_OM_NODE_GET_BUILD_STATUS(om_node, env)) && !(AXIS2_OM_STAX_BUILDER_IS_COMPLETE(om_builder,
env)))
     {
@@ -133,21 +137,19 @@
         if(status == AXIS2_FAILURE)
                printf("failure %s" ,AXIS2_ERROR_GET_MESSAGE((*env)->error));
     }
-    */
     xml_writer = axis2_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE);
     
     om_output = axis2_om_output_create( env, xml_writer);  
     
     AXIS2_SOAP_ENVELOPE_SERIALIZE(soap_envelope, env, om_output, AXIS2_FALSE);
     buffer = AXIS2_XML_WRITER_GET_XML(xml_writer, env);         
-    printf("%s", buffer);
+    printf("%s \n", buffer);
     if(buffer)
          AXIS2_FREE((*env)->allocator, buffer);
     AXIS2_SOAP_ENVELOPE_FREE(soap_envelope, env);
     AXIS2_SOAP_BUILDER_FREE(soap_builder, env);
     AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);
     AXIS2_OM_OUTPUT_FREE(om_output, env);
-    
     return AXIS2_SUCCESS;
     
 }



Mime
View raw message