ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r371831 - in /webservices/axis2/trunk/c: modules/xml/om/om_node.c modules/xml/om/om_stax_builder.c modules/xml/soap/soap_builder.c modules/xml/soap/soap_envelope.c test/xml/soap/test_soap.c
Date Tue, 24 Jan 2006 06:05:13 GMT
Author: nandika
Date: Mon Jan 23 22:05:02 2006
New Revision: 371831

URL: http://svn.apache.org/viewcvs?rev=371831&view=rev
Log: (empty)

Modified:
    webservices/axis2/trunk/c/modules/xml/om/om_node.c
    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
    webservices/axis2/trunk/c/test/xml/soap/test_soap.c

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=371831&r1=371830&r2=371831&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_node.c Mon Jan 23 22:05:02 2006
@@ -592,13 +592,16 @@
                               axis2_env_t **env)
 {   
     axis2_om_node_impl_t *om_node_impl = NULL;
+    int token = 0;
     AXIS2_FUNC_PARAM_CHECK(om_node, env, NULL);
     om_node_impl = AXIS2_INTF_TO_IMPL(om_node);
     /**********************************************************/
     while(!(om_node_impl->first_child) && !(om_node_impl->done) 
         && om_node_impl->builder)
     {
-        AXIS2_OM_STAX_BUILDER_NEXT_WITH_TOKEN(om_node_impl->builder, env);
+        token = AXIS2_OM_STAX_BUILDER_NEXT_WITH_TOKEN(om_node_impl->builder, env);
+        if(token == -1)
+            break;
     }
     /**********************************************************/
     return om_node_impl->first_child;
@@ -626,13 +629,16 @@
                                 axis2_env_t **env)
 {
     axis2_om_node_impl_t *om_node_impl = NULL;
+    int token = 0;
     AXIS2_FUNC_PARAM_CHECK(om_node, env, NULL);
     om_node_impl = AXIS2_INTF_TO_IMPL(om_node);
     /*****************************************************/
     while(!(om_node_impl->next_sibling) && om_node_impl->parent &&
     om_node_impl->builder && !(AXIS2_OM_NODE_GET_BUILD_STATUS(om_node_impl->parent,
env)))
     {
-        AXIS2_OM_STAX_BUILDER_NEXT_WITH_TOKEN(om_node_impl->builder, env);
+        token = AXIS2_OM_STAX_BUILDER_NEXT_WITH_TOKEN(om_node_impl->builder, env);
+        if(token == -1)
+           break;
     }
     /*******************************************************/
     return om_node_impl->next_sibling;

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=371831&r1=371830&r2=371831&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 Mon Jan 23 22:05:02 2006
@@ -893,13 +893,13 @@
     if (builder_impl->done)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_BUILDER_DONE_CANNOT_PULL, AXIS2_FAILURE);
-            return -1;
+        return -1;
     }
 
         token = AXIS2_XML_READER_NEXT (builder_impl->parser, env);
         if(token == -1)
         {
-          /*  builder_impl->done = AXIS2_TRUE; */
+            builder_impl->done = AXIS2_TRUE;
             return -1;
         }
                 

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=371831&r1=371830&r2=371831&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_builder.c Mon Jan 23 22:05:02 2006
@@ -60,7 +60,7 @@
     
     int last_node_status;
     
-    
+    axis2_bool_t  done;
 }axis2_soap_builder_impl_t;
 
 typedef enum axis2_builder_last_node_states
@@ -70,6 +70,9 @@
     AXIS2_BUILDER_LAST_NODE_DONE_FALSE
 }axis2_builder_last_node_states;
 
+#define AXIS2_MAX_EVENT 100
+
+
 /***************** Macro ******************************************************/
 
  #define AXIS2_INTF_TO_IMPL(builder) ((axis2_soap_builder_impl_t*)builder)
@@ -170,7 +173,7 @@
         return NULL;
     }
     
-    
+    builder_impl->done = AXIS2_FALSE;
     builder_impl->body_present = AXIS2_FALSE;
     builder_impl->builder_helper = NULL;
     builder_impl->element_level= 0;
@@ -289,11 +292,16 @@
 {
     axis2_soap_builder_impl_t *builder_impl = NULL;
     axis2_om_node_t *lastnode = NULL;
-    int current_event = -1;
+    int current_event = AXIS2_MAX_EVENT;
     axis2_om_node_t *current_node =  NULL;
     int status = AXIS2_SUCCESS;
     AXIS2_FUNC_PARAM_CHECK(builder, env, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    if(builder_impl->done)
+    {
+        return AXIS2_FAILURE;
+    }
+    
     lastnode = AXIS2_OM_STAX_BUILDER_GET_LAST_NODE(builder_impl->om_builder, env);
     
     if(!lastnode)
@@ -314,6 +322,11 @@
     /*
     current_event = AXIS2_OM_STAX_BUILDER_GET_CURRENT_EVENT(builder_impl->om_builder,
env);
     */
+    if(current_event == -1)
+    {
+        builder_impl->done = AXIS2_TRUE;
+        return AXIS2_FAILURE;
+    }
     if(current_event == AXIS2_XML_READER_EMPTY_ELEMENT ||
         current_event ==  AXIS2_XML_READER_START_ELEMENT)
     {

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=371831&r1=371830&r2=371831&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Mon Jan 23 22:05:02 2006
@@ -536,32 +536,33 @@
     /*
     if(envelope_impl->soap_version == AXIS2_SOAP11)
     {
-    axis2_om_node_t *fault_node = NULL;
-    axis2_om_element_t *fault_ele =  NULL;
-    axis2_soap_fault_t *soap_fault = NULL;
-    axis2_soap_body_t *soap_body = NULL;
-    axis2_soap_fault_code_t *fault_code = NULL;
-    axis2_om_node_t *fault_node = NULL;
-    axis2_om_element_t *fault_ele  = NULL;
-    
-    axis2_om_node_t *om_node1 = NULL;
-    axis2_om_element_t *om_ele1 = NULL;
-    soap_body = AXIS2_SOAP_ENVELOPE_GET_BODY(envelope, env);
+        axis2_soap_body_t *soap_body = NULL;
+        soap_body = AXIS2_SOAP_ENVELOPE_GET_BODY(envelope, env);
         if(soap_body)
         {
+            axis2_soap_fault_t *soap_fault = NULL;
+            axis2_om_node_t *soap_fault_om_node = NULL;
+            axis2_om_element_t *soap_fault_om_ele = NULL;
+            
             if(AXIS2_SOAP_BODY_HAS_FAULT(soap_body, env))
             {
+                axis2_soap_fault_code_t *fault_code = NULL;
+                axis2_om_node_t *fault_code_om_node = NULL;
+                axis2_om_element_t *fault_code_om_ele = NULL;
+                
                 soap_fault = AXIS2_SOAP_BODY_GET_FAULT(soap_body, env);
-                fault_code = AXIS2_SOAP_FAULT_GET_CODE(soap_fault, env);
-                if(fault_code)
+                if(soap_fault)
                 {
-                    om_node = AXIS2_SOAP_FAULT_CODE_GET_BASE_NODE(fault_code, env);
-                    om_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(om_node,
env);
-                    AXIS2_OM_ELEMENT_SET_LOCALNAME(om_ele, env, AXIS2_SOAP11_SOAP_FAULT_CODE_LOCAL_NAME);

-                    
-                                       
-                    
+                    fault_code = AXIS2_SOAP_FAULT_GET_CODE(soap_fault, env);
+                    if(fault_code)
+                    {
+                        fault_code_om_node = AXIS2_SOAP_FAULT_CODE_GET_BASE_NODE(fault_code,
env);
+                        fault_code_om_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(fault_code_om_node,
env);
+                        AXIS2_OM_ELEMENT_SET_LOCALNAME(fault_code_om_ele, env, AXIS2_SOAP11_SOAP_FAULT_CODE_LOCAL_NAME);

+                        
+                                           
                     
+                    }
                     
                 }  
             }

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=371831&r1=371830&r2=371831&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/soap/test_soap.c (original)
+++ webservices/axis2/trunk/c/test/xml/soap/test_soap.c Mon Jan 23 22:05:02 2006
@@ -110,7 +110,7 @@
             printnode(om_node, env);
         }
     }
-    AXIS2_OM_CHILDREN_QNAME_ITERATOR_FREE(children_iter, env);
+ //   AXIS2_OM_CHILDREN_QNAME_ITERATOR_FREE(children_iter, env);
     
     soap_body = AXIS2_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
     if (soap_body)
@@ -235,7 +235,7 @@
     printf("\nbuild soap\n");
     build_soap(&env, filename,uri);
     axis2_env_free(env); 
-    free(allocator);
+    
     env = NULL;
     allocator = NULL;
     printf("\n");



Mime
View raw message