axis-c-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r1179506 - in /axis/axis2/c/core/trunk/axiom/src: om/axiom_element_internal.h om/om_element.c soap/soap11_builder_helper.c
Date Thu, 06 Oct 2011 05:44:19 GMT
Author: shankar
Date: Thu Oct  6 05:44:18 2011
New Revision: 1179506

URL: http://svn.apache.org/viewvc?rev=1179506&view=rev
Log:
Some frameworks (e.g WSE) sends empty faultstring. Hence checking for empty and continue without
failing. 

Modified:
    axis/axis2/c/core/trunk/axiom/src/om/axiom_element_internal.h
    axis/axis2/c/core/trunk/axiom/src/om/om_element.c
    axis/axis2/c/core/trunk/axiom/src/soap/soap11_builder_helper.c

Modified: axis/axis2/c/core/trunk/axiom/src/om/axiom_element_internal.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/axiom_element_internal.h?rev=1179506&r1=1179505&r2=1179506&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/axiom_element_internal.h (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/axiom_element_internal.h Thu Oct  6 05:44:18 2011
@@ -144,4 +144,9 @@ extern "C"
         const axutil_env_t * env,
         axis2_bool_t is_empty);
 
+	AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+	axiom_element_get_is_empty(
+		axiom_element_t * om_element,
+		const axutil_env_t * env);
+
 #endif /* AXIOM_ELEMENT_INTERNAL_H_ */

Modified: axis/axis2/c/core/trunk/axiom/src/om/om_element.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/om/om_element.c?rev=1179506&r1=1179505&r2=1179506&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/om/om_element.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/om/om_element.c Thu Oct  6 05:44:18 2011
@@ -1565,6 +1565,14 @@ axiom_element_set_is_empty(
     om_element->is_empty = is_empty;
 }
 
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axiom_element_get_is_empty(
+    axiom_element_t * om_element,
+    const axutil_env_t * env)
+{
+    return om_element->is_empty;
+}
+
 /**
  * This method will declare the namespace without checking whether it is already declared.

  * (This method is only used by codegen. We have to remove this method in future)
@@ -1859,14 +1867,6 @@ axiom_element_create_str(
     return element;
 }
 
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axiom_element_get_is_empty(
-    axiom_element_t * om_element,
-    const axutil_env_t * env)
-{
-    return om_element->is_empty;
-}
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axiom_element_remove_attribute(
     axiom_element_t * om_element,

Modified: axis/axis2/c/core/trunk/axiom/src/soap/soap11_builder_helper.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/axiom/src/soap/soap11_builder_helper.c?rev=1179506&r1=1179505&r2=1179506&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/axiom/src/soap/soap11_builder_helper.c (original)
+++ axis/axis2/c/core/trunk/axiom/src/soap/soap11_builder_helper.c Thu Oct  6 05:44:18 2011
@@ -29,6 +29,7 @@
 #include "_axiom_soap_fault_role.h"
 #include <axiom_stax_builder_internal.h>
 #include <axiom_node_internal.h>
+#include <axiom_element_internal.h>
 
 static axis2_status_t
 axiom_soap11_builder_helper_process_text(
@@ -223,12 +224,15 @@ axiom_soap11_builder_helper_handle_event
                 return AXIS2_FAILURE;
             }
             axiom_stax_builder_set_lastnode(builder_helper->om_builder, env, fault_text_node);
-
-            status = axiom_soap11_builder_helper_process_text(builder_helper, env);
-            if(status == AXIS2_FAILURE)
-            {
-                return AXIS2_FAILURE;
-            }
+			
+			if (axiom_element_get_is_empty(om_ele, env) != AXIS2_TRUE)
+			{
+				status = axiom_soap11_builder_helper_process_text(builder_helper, env);
+				if(status == AXIS2_FAILURE)
+				{
+					return AXIS2_FAILURE;
+				}
+			}
             axiom_stax_builder_set_lastnode(builder_helper->om_builder, env, om_element_node);
 
             axiom_node_set_complete(om_element_node, env, AXIS2_TRUE);



Mime
View raw message