axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r388367 [2/2] - in /webservices/axis2/trunk/c: include/ modules/core/addr/ modules/core/clientapi/ modules/xml/parser/libxml2/ samples/client/math/
Date Fri, 24 Mar 2006 04:48:18 GMT
Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c?rev=388367&r1=388366&r2=388367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.c Thu Mar 23 20:48:17
2006
@@ -35,38 +35,54 @@
 typedef struct axis2_transport_listener_state 
 {
     int waiting_calls;
+
     axis2_transport_receiver_t *listener;
+    
 } axis2_transport_listener_state_t;
 
 
 /** Interface to implementation conversion macro */
 #define AXIS2_INTF_TO_IMPL(listener_manager) ((axis2_listener_manager_impl_t *)listener_manager)
 
-axis2_status_t AXIS2_CALL axis2_listener_manager_make_sure_started(struct axis2_listener_manager
*listener_manager, 
-    axis2_env_t **env, 
-    axis2_char_t *transport,
-    axis2_conf_ctx_t *conf_ctx);
-axis2_status_t AXIS2_CALL axis2_listener_manager_stop(struct axis2_listener_manager *listener_manager,

-    axis2_env_t **env, 
-    axis2_char_t *transport);
-axis2_endpoint_ref_t* AXIS2_CALL axis2_listener_manager_reply_to_epr(struct axis2_listener_manager
*listener_manager, 
-    axis2_env_t **env, 
-    axis2_char_t *svc_name,
-    axis2_char_t *transport);
-axis2_status_t AXIS2_CALL axis2_listener_manager_free (struct axis2_listener_manager *listener_manager,

-                                   axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_make_sure_started(struct axis2_listener_manager *listener_manager,

+                                        axis2_env_t **env, 
+                                        axis2_char_t *transport,
+                                        axis2_conf_ctx_t *conf_ctx);
+                                        
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_stop(struct axis2_listener_manager *listener_manager, 
+                            axis2_env_t **env, 
+                            axis2_char_t *transport);
+                            
+axis2_endpoint_ref_t* AXIS2_CALL 
+axis2_listener_manager_reply_to_epr(struct axis2_listener_manager *listener_manager, 
+                                    axis2_env_t **env, 
+                                    axis2_char_t *svc_name,
+                                    axis2_char_t *transport);
+                                    
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_free (struct axis2_listener_manager *listener_manager, 
+                             axis2_env_t **env);
+                             
 
 axis2_conf_ctx_t *AXIS2_CALL
 axis2_listener_manager_get_conf_ctx(axis2_listener_manager_t *listener_manager,
                                     axis2_env_t **env);
 
-axis2_listener_manager_t* AXIS2_CALL axis2_listener_manager_create(axis2_env_t **env)
+                                    
+
+axis2_listener_manager_t* AXIS2_CALL 
+axis2_listener_manager_create(axis2_env_t **env)
 {
     axis2_listener_manager_impl_t *listener_manager_impl = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
     
-    listener_manager_impl = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_listener_manager_impl_t)
);
+    listener_manager_impl = 
+        AXIS2_MALLOC((*env)->allocator, sizeof(axis2_listener_manager_impl_t));
+        
     if (!listener_manager_impl)
     { 
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -85,7 +101,9 @@
     }
     
     /* initialize ops */    
-    listener_manager_impl->listener_manager.ops  = AXIS2_MALLOC( (*env)->allocator,
sizeof(axis2_listener_manager_ops_t) );
+    listener_manager_impl->listener_manager.ops  = 
+        AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_listener_manager_ops_t) );
+        
     if (!listener_manager_impl->listener_manager.ops)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -93,20 +111,28 @@
         return NULL;        
     }
 
-    listener_manager_impl->listener_manager.ops->make_sure_started = axis2_listener_manager_make_sure_started;
-    listener_manager_impl->listener_manager.ops->stop = axis2_listener_manager_stop;
-    listener_manager_impl->listener_manager.ops->reply_to_epr = axis2_listener_manager_reply_to_epr;
+    listener_manager_impl->listener_manager.ops->make_sure_started = 
+        axis2_listener_manager_make_sure_started;
+        
+    listener_manager_impl->listener_manager.ops->stop = 
+        axis2_listener_manager_stop;
+        
+    listener_manager_impl->listener_manager.ops->reply_to_epr = 
+        axis2_listener_manager_reply_to_epr;
+        
     listener_manager_impl->listener_manager.ops->get_conf_ctx = 
             axis2_listener_manager_get_conf_ctx;
-    listener_manager_impl->listener_manager.ops->free = axis2_listener_manager_free;
+    listener_manager_impl->listener_manager.ops->free = 
+        axis2_listener_manager_free;
 
     return &(listener_manager_impl->listener_manager);
 }
 
-axis2_status_t AXIS2_CALL axis2_listener_manager_make_sure_started(struct axis2_listener_manager
*listener_manager, 
-    axis2_env_t **env, 
-    axis2_char_t *transport,
-    axis2_conf_ctx_t *conf_ctx)
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_make_sure_started(struct axis2_listener_manager *listener_manager,

+                                        axis2_env_t **env, 
+                                        axis2_char_t *transport,
+                                        axis2_conf_ctx_t *conf_ctx)
 {
     axis2_listener_manager_impl_t *listener_manager_impl = NULL;
     axis2_transport_listener_state_t *tl_state = NULL;
@@ -120,7 +146,8 @@
     {
         if (conf_ctx != listener_manager_impl->conf_ctx)
         {
-            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CLIENT_SIDE_SUPPORT_ONLY_ONE_CONF_CTX,
AXIS2_FAILURE);
+            AXIS2_ERROR_SET((*env)->error, 
+                AXIS2_ERROR_CLIENT_SIDE_SUPPORT_ONLY_ONE_CONF_CTX, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
@@ -130,8 +157,9 @@
     }
     
 
-    tl_state = (axis2_transport_listener_state_t*) axis2_hash_get(listener_manager_impl->listener_map,

-                transport, AXIS2_HASH_KEY_STRING);
+    tl_state = (axis2_transport_listener_state_t*) 
+                axis2_hash_get(listener_manager_impl->listener_map, transport, AXIS2_HASH_KEY_STRING);
+                
     if (!tl_state) 
     {
         /*means this transport not yet started, start the transport*/
@@ -154,7 +182,9 @@
                     {
                         AXIS2_TRANSPORT_RECEIVER_START(listener, env);
                         
-                        tl_state  = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_transport_listener_state_t)
);
+                        tl_state  = AXIS2_MALLOC( (*env)->allocator, 
+                                        sizeof(axis2_transport_listener_state_t) );
+                        
                         if (!tl_state)
                         {
                             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -163,7 +193,8 @@
                         {
                             tl_state->listener = listener;
                             tl_state->waiting_calls = 0;
-                            axis2_hash_set(listener_manager_impl->listener_map, transport,
AXIS2_HASH_KEY_STRING, tl_state);
+                            axis2_hash_set(listener_manager_impl->listener_map, 
+                                    transport, AXIS2_HASH_KEY_STRING, tl_state);
                         }                            
                     }
                 }
@@ -180,9 +211,10 @@
         return AXIS2_FAILURE;
 }
 
-axis2_status_t AXIS2_CALL axis2_listener_manager_stop(struct axis2_listener_manager *listener_manager,

-    axis2_env_t **env, 
-    axis2_char_t *transport)
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_stop(struct axis2_listener_manager *listener_manager, 
+                            axis2_env_t **env, 
+                            axis2_char_t *transport)
 {
     axis2_listener_manager_impl_t *listener_manager_impl = NULL;
     axis2_transport_listener_state_t *tl_state = NULL;
@@ -192,7 +224,9 @@
     
     listener_manager_impl = AXIS2_INTF_TO_IMPL(listener_manager);
     
-    tl_state = (axis2_transport_listener_state_t*) axis2_hash_get(listener_manager_impl->listener_map,
transport, AXIS2_HASH_KEY_STRING);
+    tl_state = (axis2_transport_listener_state_t*) 
+        axis2_hash_get(listener_manager_impl->listener_map, transport, AXIS2_HASH_KEY_STRING);
+    
     if (tl_state) 
     {
         tl_state->waiting_calls--;
@@ -202,17 +236,19 @@
             if (status != AXIS2_SUCCESS)
                 return status;
             
-            axis2_hash_set(listener_manager_impl->listener_map, transport, AXIS2_HASH_KEY_STRING,
NULL);            
+            axis2_hash_set(listener_manager_impl->listener_map, 
+                transport, AXIS2_HASH_KEY_STRING, NULL);            
         }
     }
     
     return status;
 }
 
-axis2_endpoint_ref_t* AXIS2_CALL axis2_listener_manager_reply_to_epr(struct axis2_listener_manager
*listener_manager, 
-    axis2_env_t **env, 
-    axis2_char_t *svc_name,
-    axis2_char_t *transport)
+axis2_endpoint_ref_t* AXIS2_CALL 
+axis2_listener_manager_reply_to_epr(struct axis2_listener_manager *listener_manager, 
+                                    axis2_env_t **env, 
+                                    axis2_char_t *svc_name,
+                                    axis2_char_t *transport)
 {
     axis2_listener_manager_impl_t *listener_manager_impl = NULL;
     axis2_transport_listener_state_t *tl_state = NULL;
@@ -221,8 +257,8 @@
     
     listener_manager_impl = AXIS2_INTF_TO_IMPL(listener_manager);
     
-    tl_state = (axis2_transport_listener_state_t*) axis2_hash_get(listener_manager_impl->listener_map,

-                    transport, AXIS2_HASH_KEY_STRING);
+    tl_state = (axis2_transport_listener_state_t*) 
+        axis2_hash_get(listener_manager_impl->listener_map, transport, AXIS2_HASH_KEY_STRING);
     if (tl_state) 
     {
         return AXIS2_TRANSPORT_RECEIVER_GET_REPLY_TO_EPR(tl_state->listener, env, svc_name);
@@ -230,8 +266,9 @@
     return NULL;
 }
 
-axis2_status_t AXIS2_CALL axis2_listener_manager_free (struct axis2_listener_manager *listener_manager,

-                                   axis2_env_t **env)
+axis2_status_t AXIS2_CALL 
+axis2_listener_manager_free (struct axis2_listener_manager *listener_manager, 
+                             axis2_env_t **env)
 {
     axis2_listener_manager_impl_t *listener_manager_impl = NULL;
     

Modified: webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h?rev=388367&r1=388366&r2=388367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/listener_manager.h Thu Mar 23 20:48:17
2006
@@ -54,30 +54,37 @@
      * @param conf_ctx
      * @throws AxisFault
      */
-    axis2_status_t (AXIS2_CALL *make_sure_started)(struct axis2_listener_manager *listener_manager,

-        axis2_env_t **env, 
-        axis2_char_t *transport,
-        axis2_conf_ctx_t *conf_ctx);
-    axis2_status_t (AXIS2_CALL *stop)(struct axis2_listener_manager *listener_manager, 
-        axis2_env_t **env, 
-        axis2_char_t *transport);
+    axis2_status_t (AXIS2_CALL *
+    make_sure_started)(struct axis2_listener_manager *listener_manager, 
+                       axis2_env_t **env, 
+                       axis2_char_t *transport,
+                       axis2_conf_ctx_t *conf_ctx);
+                       
+    axis2_status_t (AXIS2_CALL *
+    stop)(struct axis2_listener_manager *listener_manager, 
+          axis2_env_t **env, 
+          axis2_char_t *transport);
     /**
      * @param serviceName
      * @param transport
      * @return reply to URL return will direct the response for the message to the given
transport listener
      * @throws AxisFault
      */
-    axis2_endpoint_ref_t* (AXIS2_CALL *reply_to_epr)(struct axis2_listener_manager *listener_manager,

-        axis2_env_t **env, 
-        axis2_char_t *svc_name,
-        axis2_char_t *transport);
+    axis2_endpoint_ref_t* (AXIS2_CALL *
+    reply_to_epr)(struct axis2_listener_manager *listener_manager, 
+                  axis2_env_t **env, 
+                  axis2_char_t *svc_name,
+                  axis2_char_t *transport);
+    
     
     axis2_conf_ctx_t *(AXIS2_CALL *
     get_conf_ctx)(axis2_listener_manager_t *listener_manager,
-                                    axis2_env_t **env);
+                  axis2_env_t **env);
     
-    axis2_status_t (AXIS2_CALL *free)(struct axis2_listener_manager *listener_manager, 
-                                       axis2_env_t **env);
+    axis2_status_t (AXIS2_CALL *
+    free)(struct axis2_listener_manager *listener_manager, 
+          axis2_env_t **env);
+          
 };
 
 /** 
@@ -89,16 +96,25 @@
     axis2_listener_manager_ops_t *ops;    
 };
 
-AXIS2_DECLARE(axis2_listener_manager_t*) axis2_listener_manager_create(axis2_env_t **env);
+AXIS2_DECLARE(axis2_listener_manager_t*) 
+axis2_listener_manager_create(axis2_env_t **env);
     
 /************************** Start of function macros **************************/
 
-#define AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(listener_manager, env, transport, conf_ctx)
((listener_manager)->ops->make_sure_started(listener_manager, env, transport, conf_ctx))
-#define AXIS2_LISTNER_MANAGER_STOP(listener_manager, env, transport) ((listener_manager)->ops->stop(listener_manager,
env, transport))
-#define AXIS2_LISTNER_MANAGER_REPLY_TO_EPR(listener_manager, env, svc_name, transport) ((listener_manager)->ops->reply_to_epr(listener_manager,
env, svc_name, transport))
+#define AXIS2_LISTNER_MANAGER_MAKE_SURE_STARTED(listener_manager, env, transport, conf_ctx)\
+        ((listener_manager)->ops->make_sure_started(listener_manager, env, transport,
conf_ctx))
+        
+#define AXIS2_LISTNER_MANAGER_STOP(listener_manager, env, transport)\
+        ((listener_manager)->ops->stop(listener_manager, env, transport))
+        
+#define AXIS2_LISTNER_MANAGER_REPLY_TO_EPR(listener_manager, env, svc_name, transport) \
+        ((listener_manager)->ops->reply_to_epr(listener_manager, env, svc_name, transport))
+        
 #define AXIS2_LISTNER_MANAGER_GET_CONF_CTX(listener_manager, env) \
         ((listener_manager)->ops->get_conf_ctx(listener_manager, env))
-#define AXIS2_LISTNER_MANAGER_FREE(listener_manager, env) ((listener_manager)->ops->free(listener_manager,
env))
+        
+#define AXIS2_LISTNER_MANAGER_FREE(listener_manager, env) \
+        ((listener_manager)->ops->free(listener_manager, env))
 
 /************************** End of function macros ****************************/    
 

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/libxml2_reader_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/libxml2_reader_wrapper.c?rev=388367&r1=388366&r2=388367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/libxml2_reader_wrapper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/libxml2_reader_wrapper.c Thu Mar
23 20:48:17 2006
@@ -214,6 +214,7 @@
     
 	axis2_libxml2_reader_wrapper_impl_t *wrapper_impl = NULL;
     AXIS2_ENV_CHECK( env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, filename, NULL);
     
     wrapper_impl = (axis2_libxml2_reader_wrapper_impl_t*)AXIS2_MALLOC((*env)->allocator,
          sizeof(axis2_libxml2_reader_wrapper_impl_t));
@@ -296,9 +297,6 @@
 
 /************** create function for io callback function **********************/
 
-
-
-
 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),
@@ -328,8 +326,10 @@
     wrapper_impl->ctx = ctx;
     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);
+        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
     {
@@ -408,7 +408,104 @@
 	return &(wrapper_impl->parser);
 }
 
+/***************** create function for character buffer ************************/
+AXIS2_DECLARE(axis2_xml_reader_t *)
+axis2_xml_reader_create_for_buffer(axis2_env_t **env,
+                                  const axis2_char_t *buffer,
+                                  int size,
+                                  const axis2_char_t *encoding)
+{    
+	axis2_libxml2_reader_wrapper_impl_t *wrapper_impl = NULL;
+    
+    AXIS2_ENV_CHECK( env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, buffer , AXIS2_FAILURE);
+        
+    wrapper_impl = (axis2_libxml2_reader_wrapper_impl_t*)AXIS2_MALLOC((*env)->allocator,
+         sizeof(axis2_libxml2_reader_wrapper_impl_t));
+    if(!wrapper_impl)
+    {
+        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->ctx = NULL;
+	
+    wrapper_impl->reader =  xmlReaderForMemory(buffer, size, 
+								NULL, encoding, XML_PARSE_RECOVER);
+
+    if(!(wrapper_impl->reader))
+    {
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+        AXIS2_ERROR_SET((*env)->error, 
+				AXIS2_ERROR_CREATING_XML_STREAM_READER, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    xmlTextReaderSetErrorHandler(wrapper_impl->reader, 
+         (xmlTextReaderErrorFunc)axis2_libxml2_reader_wrapper_error_handler, 
+         (*env));
+
+    wrapper_impl->current_event = -1;
+    
+    axis2_libxml2_reader_wrapper_init_map(wrapper_impl);
+    
+    wrapper_impl->parser.ops = NULL;
+    wrapper_impl->parser.ops = (axis2_xml_reader_ops_t*)AXIS2_MALLOC((*env)->allocator,
+                                sizeof(axis2_xml_reader_ops_t));
+    
+    if(!(wrapper_impl->parser.ops))
+    {
+        xmlFreeTextReader(wrapper_impl->reader);
+        AXIS2_FREE((*env)->allocator, wrapper_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
 
+	
+	wrapper_impl->parser.ops->free = axis2_libxml2_reader_wrapper_free;
+    wrapper_impl->parser.ops->next = axis2_libxml2_reader_wrapper_next;
+    wrapper_impl->parser.ops->xml_free = axis2_libxml2_reader_wrapper_xml_free;
+    
+    wrapper_impl->parser.ops->get_attribute_count =
+        axis2_libxml2_reader_wrapper_get_attribute_count;
+    wrapper_impl->parser.ops->get_attribute_name_by_number =
+        axis2_libxml2_reader_wrapper_get_attribute_name_by_number;
+    wrapper_impl->parser.ops->get_attribute_value_by_number = 
+        axis2_libxml2_reader_wrapper_get_attribute_value_by_number;
+    wrapper_impl->parser.ops->get_attribute_namespace_by_number =
+        axis2_libxml2_reader_wrapper_get_attribute_namespace_by_number;
+    wrapper_impl->parser.ops->get_attribute_prefix_by_number =
+        axis2_libxml2_reader_wrapper_get_attribute_prefix_by_number;
+    
+    wrapper_impl->parser.ops->get_value =
+        axis2_libxml2_reader_wrapper_get_value;
+    wrapper_impl->parser.ops->get_prefix =
+        axis2_libxml2_reader_wrapper_get_prefix;
+    wrapper_impl->parser.ops->get_name =
+        axis2_libxml2_reader_wrapper_get_name;
+        
+        
+    wrapper_impl->parser.ops->get_namespace_count =
+        axis2_libxml2_reader_wrapper_get_namespace_count;
+    wrapper_impl->parser.ops->get_namespace_prefix_by_number =
+        axis2_libxml2_reader_wrapper_get_namespace_prefix_by_number;
+    wrapper_impl->parser.ops->get_namespace_uri_by_number =
+        axis2_libxml2_reader_wrapper_get_namespace_uri_by_number;
+        
+    wrapper_impl->parser.ops->get_pi_target =
+        axis2_libxml2_reader_wrapper_get_pi_target;
+    wrapper_impl->parser.ops->get_pi_data =
+        axis2_libxml2_reader_wrapper_get_pi_data;
+        
+    wrapper_impl->parser.ops->get_dtd =
+        axis2_libxml2_reader_wrapper_get_dtd;
+        
+    wrapper_impl->parser.ops->get_char_set_encoding =
+        axis2_libxml2_reader_get_char_set_encoding;            
+	return &(wrapper_impl->parser);
+}
+/****************** end create functions ***************************************/
 
 int AXIS2_CALL
 axis2_libxml2_reader_wrapper_next(axis2_xml_reader_t *parser,

Modified: webservices/axis2/trunk/c/samples/client/math/math_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/math/math_client.c?rev=388367&r1=388366&r2=388367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/math/math_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/math/math_client.c Thu Mar 23 20:48:17 2006
@@ -122,6 +122,16 @@
             AXIS2_OM_NODE_SERIALIZE (ret_node, &env, om_output);
             buffer = AXIS2_XML_WRITER_GET_XML(writer, &env);
             printf ("\nReceived invalid OM as result : %s\n", buffer);
+            if(NULL != buffer)
+            {
+                AXIS2_FREE(env->allocator, buffer);
+                buffer = NULL;
+            }
+            if(NULL != om_output)
+            {
+                AXIS2_OM_OUTPUT_FREE(om_output, &env);
+                om_output = NULL;
+            }
         }
     }
     else
@@ -169,6 +179,16 @@
     AXIS2_OM_NODE_SERIALIZE(math_om_node, env, om_output);
     buffer = AXIS2_XML_WRITER_GET_XML(xml_writer, env);         
     AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "\nSending OM node in XML : %s \n",  buffer);

+    if(NULL != buffer)
+    {
+        AXIS2_FREE((*env)->allocator, buffer);
+        buffer = NULL;
+    }
+    if(NULL != om_output)
+    {
+        AXIS2_OM_OUTPUT_FREE(om_output, env);
+        om_output = NULL;
+    }
 
     return math_om_node;
 }



Mime
View raw message