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/02/28 10:53:09 UTC

svn commit: r381615 - in /webservices/axis2/trunk/c/modules/xml: om/om_stax_builder.c soap/soap_builder.c soap/soap_envelope.c

Author: nandika
Date: Tue Feb 28 01:53:08 2006
New Revision: 381615

URL: http://svn.apache.org/viewcvs?rev=381615&view=rev
Log:
soap_builder_free function modified to free stax_om_builder 

Modified:
    webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c

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=381615&r1=381614&r2=381615&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 Tue Feb 28 01:53:08 2006
@@ -812,7 +812,14 @@
         AXIS2_OM_DOCUMENT_FREE(builder_impl->document, env);
         builder_impl->document = NULL;
     }
-
+    else
+    {
+        if(NULL != builder_impl->root_node )
+        {
+            AXIS2_OM_NODE_FREE_TREE(builder_impl->root_node, env);
+            builder_impl->root_node = NULL;
+        }
+    }
 	if(builder->ops)
 	{
 		AXIS2_FREE ((*env)->allocator, builder->ops);

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=381615&r1=381614&r2=381615&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Tue Feb 28 01:53:08 2006
@@ -252,6 +252,11 @@
             AXIS2_SOAP12_BUILDER_HELPER_FREE((axis2_soap12_builder_helper_t *)(builder_impl->builder_helper), env);
         }
     }
+    if(builder_impl->om_builder)
+    {
+        AXIS2_OM_STAX_BUILDER_FREE(builder_impl->om_builder, env);
+        builder_impl->om_builder = NULL;
+    }
     if(builder->ops)
     {
         AXIS2_FREE((*env)->allocator, builder->ops);
@@ -456,14 +461,12 @@
             axis2_soap_header_t *soap_header = NULL;
             if(builder_impl->header_present)
             {
-                printf("AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED");
                 AXIS2_ERROR_SET((*env)->error, 
                     AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_HEADERS_ENCOUNTERED, AXIS2_FAILURE);
                     return AXIS2_FAILURE;
             }
             if(builder_impl->body_present)
             {
-                printf("AXIS2_ERROR_SOAP_BUILDER_HEADER_BODY_WRONG_ORDER");
                 AXIS2_ERROR_SET((*env)->error,
                     AXIS2_ERROR_SOAP_BUILDER_HEADER_BODY_WRONG_ORDER, AXIS2_FAILURE);
                 return  AXIS2_FAILURE;                                              
@@ -486,7 +489,6 @@
             axis2_soap_body_t *soap_body = NULL;
             if(builder_impl->body_present)
             {
-                printf("AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED");
                 AXIS2_ERROR_SET((*env)->error, 
                     AXIS2_ERROR_SOAP_BUILDER_MULTIPLE_BODY_ELEMENTS_ENCOUNTERED, AXIS2_FAILURE);
                 return AXIS2_FAILURE;                   
@@ -504,7 +506,6 @@
         }
         else
         {
-            printf("AXIS2_ERROR_SOAP_BUILDER_ENVELOPE_CAN_HAVE_ONLY_HEADER_AND_BODY");
             AXIS2_ERROR_SET((*env)->error,
                     AXIS2_ERROR_SOAP_BUILDER_ENVELOPE_CAN_HAVE_ONLY_HEADER_AND_BODY, AXIS2_FAILURE);
             return AXIS2_FAILURE;                                            

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c?rev=381615&r1=381614&r2=381615&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Tue Feb 28 01:53:08 2006
@@ -272,8 +272,17 @@
     }
     if(envelope_impl->om_ele_node)
     {
-        AXIS2_OM_NODE_FREE_TREE(envelope_impl->om_ele_node, env);
-        envelope_impl->om_ele_node = NULL;
+        if(envelope_impl->soap_builder)
+        {
+            AXIS2_SOAP_BUILDER_FREE(envelope_impl->soap_builder, env);
+            envelope_impl->soap_builder = NULL;
+            envelope_impl->om_ele_node = NULL;
+        }
+        else
+        {
+            AXIS2_OM_NODE_FREE_TREE(envelope_impl->om_ele_node, env); 
+            envelope_impl->om_ele_node = NULL;
+        }
     }
     
     AXIS2_FREE((*env)->allocator, envelope_impl);