diff options
author | shankar | 2011-10-06 05:45:03 +0000 |
---|---|---|
committer | shankar | 2011-10-06 05:45:03 +0000 |
commit | 2bf4acce1aa1ca09e05cb5188c43443fec0ae47f (patch) | |
tree | af2c107c922dabeffa0ecf888a033a61804a5426 | |
parent | 62bcb27c130942a84160eac1893f3cdd1ab7b0ed (diff) | |
download | axis2c-2bf4acce1aa1ca09e05cb5188c43443fec0ae47f.tar.gz axis2c-2bf4acce1aa1ca09e05cb5188c43443fec0ae47f.tar.bz2 |
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
-rw-r--r-- | src/core/clientapi/op_client.c | 20 |
1 files 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 { |