You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2007/03/05 09:03:04 UTC
svn commit: r514597 -
/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
Author: damitha
Date: Mon Mar 5 00:03:04 2007
New Revision: 514597
URL: http://svn.apache.org/viewvc?view=rev&rev=514597
Log:
My previous commit haven't handled the null response_envelope case. Fixed it.
Modified:
webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?view=diff&rev=514597&r1=514596&r2=514597
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Mon Mar 5 00:03:04 2007
@@ -704,7 +704,18 @@
engine = NULL;
}
response_envelope = AXIS2_MSG_CTX_GET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env);
- if(!response_envelope)
+ if(response_envelope)
+ {
+ AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+ engine = axis2_engine_create(env, conf_ctx);
+ if (engine)
+ {
+ status = AXIS2_ENGINE_RECEIVE(engine, env, response);
+ if (status != AXIS2_SUCCESS)
+ return NULL;
+ }
+ }
+ else
{
while(!response_envelope && index > 0)
{
@@ -715,18 +726,32 @@
response_envelope = axis2_msg_ctx_get_response_soap_envelope(
msg_ctx, env);
}
- AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
- return response;
- }
- else
- {
- AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
- engine = axis2_engine_create(env, conf_ctx);
- if (engine)
+ /* if it is a two way message, then the status should be in error,
+ else it is a one way message */
+ if (response_envelope)
{
- status = AXIS2_ENGINE_RECEIVE(engine, env, response);
- if (status != AXIS2_SUCCESS)
+ AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+ engine = axis2_engine_create(env, conf_ctx);
+ if (engine)
+ {
+ status = AXIS2_ENGINE_RECEIVE(engine, env, response);
+ if (status != AXIS2_SUCCESS)
+ return NULL;
+ }
+ }
+ else
+ {
+ if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, AXIS2_FAILURE);
+ if (engine)
+ {
+ AXIS2_ENGINE_FREE(engine, env);
+ engine = NULL;
+ }
+ AXIS2_MSG_CTX_FREE(response, env);
return NULL;
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org