From 2bf4acce1aa1ca09e05cb5188c43443fec0ae47f Mon Sep 17 00:00:00 2001 From: shankar Date: Thu, 6 Oct 2011 05:45:03 +0000 Subject: Calling INfaultflow when received message has a fault. git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@1179507 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/clientapi/op_client.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/core/clientapi/op_client.c b/src/core/clientapi/op_client.c index 539f687..43479e6 100644 --- a/src/core/clientapi/op_client.c +++ b/src/core/clientapi/op_client.c @@ -1218,7 +1218,12 @@ axis2_op_client_two_way_send( response_envelope = axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env); if(response_envelope) { + axiom_soap_body_t * soap_body = NULL; + axis2_bool_t has_fault = AXIS2_FALSE; axis2_msg_ctx_set_soap_envelope(response, env, response_envelope); + soap_body = axiom_soap_envelope_get_body(response_envelope, env); + has_fault = axiom_soap_body_has_fault(soap_body, env); + engine = axis2_engine_create(env, conf_ctx); if(engine) { @@ -1235,10 +1240,17 @@ axis2_op_client_two_way_send( return response; } } - status = axis2_engine_receive(engine, env, response); - if(status != AXIS2_SUCCESS ) - return NULL; - } + if(has_fault) + { + status = axis2_engine_receive_fault(engine, env, msg_ctx); + } + else + { + status = axis2_engine_receive(engine, env, response); + } + if(status != AXIS2_SUCCESS ) + return NULL; + } } else { -- cgit v1.1-32-gdbae