diff options
Diffstat (limited to 'axiom/src')
-rw-r--r-- | axiom/src/om/axiom_element_internal.h | 5 | ||||
-rw-r--r-- | axiom/src/om/om_element.c | 16 | ||||
-rw-r--r-- | axiom/src/soap/soap11_builder_helper.c | 16 |
3 files changed, 23 insertions, 14 deletions
diff --git a/axiom/src/om/axiom_element_internal.h b/axiom/src/om/axiom_element_internal.h index df515f9..81c9721 100644 --- a/axiom/src/om/axiom_element_internal.h +++ b/axiom/src/om/axiom_element_internal.h @@ -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_ */ diff --git a/axiom/src/om/om_element.c b/axiom/src/om/om_element.c index 7a56b54..1e92a2d 100644 --- a/axiom/src/om/om_element.c +++ b/axiom/src/om/om_element.c @@ -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, diff --git a/axiom/src/soap/soap11_builder_helper.c b/axiom/src/soap/soap11_builder_helper.c index ab2e4d8..f6c4c65 100644 --- a/axiom/src/soap/soap11_builder_helper.c +++ b/axiom/src/soap/soap11_builder_helper.c @@ -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); |