summaryrefslogtreecommitdiffstats
path: root/axiom
diff options
context:
space:
mode:
authorGravatar shankar2010-04-07 02:46:47 +0000
committerGravatar shankar2010-04-07 02:46:47 +0000
commit4e1d80529b1a5b298b8173757222a3164d8bc453 (patch)
treea168d4f19a07ab94b61dc376dc7642682419ff34 /axiom
parent54dbf70b6b44179c7bcaa1b2cdea6d8a1ee54f0e (diff)
downloadaxis2c-4e1d80529b1a5b298b8173757222a3164d8bc453.tar.gz
axis2c-4e1d80529b1a5b298b8173757222a3164d8bc453.tar.bz2
Fixing issue AXIS2C-1232
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@931411 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'axiom')
-rw-r--r--axiom/src/soap/soap_body.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/axiom/src/soap/soap_body.c b/axiom/src/soap/soap_body.c
index 69ee7ae..be2372f 100644
--- a/axiom/src/soap/soap_body.c
+++ b/axiom/src/soap/soap_body.c
@@ -145,25 +145,17 @@ axiom_soap_body_has_fault(
else
{
/* This soap body could have been built programatically. Do the following only if soap
- * body is created from soap_builder */
- if(soap_body->soap_builder)
+ * body is created from soap_builder. Check for last child is to make sure body's child
+ * are not yet built. If atleast one child is built, we don't need to build it again,
+ * because , if fault, first child node of body node should be the fault node. If the child
+ * is not built yet, trigger it to be built. */
+ if(soap_body->soap_builder && !axiom_node_is_complete(soap_body->om_ele_node, env) &&
+ !axiom_node_get_last_child(soap_body->om_ele_node, env))
{
- while(!axiom_node_is_complete(soap_body->om_ele_node, env))
+ axiom_soap_builder_next(soap_body->soap_builder, env);
+ if(soap_body->soap_fault)
{
- if(axiom_soap_builder_next(soap_body->soap_builder, env) != AXIS2_SUCCESS)
- {
- /* problem in building the SOAP body. Note that has_fault is about soap fault,
- * not about problem in building the node. So, even though there is a problem
- * building the body, has_fault should be AXIS2_FALSE
- */
- break;
- }
-
- if(soap_body->soap_fault)
- {
- soap_body->has_fault = AXIS2_TRUE;
- break;
- }
+ soap_body->has_fault = AXIS2_TRUE;
}
}
}