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 sa...@apache.org on 2006/09/06 20:38:10 UTC
svn commit: r440825 - in /webservices/axis2/trunk/c/modules/core:
clientapi/op_client.c context/ctx.c
Author: samisa
Date: Wed Sep 6 11:38:09 2006
New Revision: 440825
URL: http://svn.apache.org/viewvc?view=rev&rev=440825
Log:
Fixed the problem related to the reuse of service client for multiple invocations.
Fix for AXIS2C-230
Modified:
webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
webservices/axis2/trunk/c/modules/core/context/ctx.c
Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=440825&r1=440824&r2=440825
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Wed Sep 6 11:38:09 2006
@@ -266,8 +266,14 @@
if (out_msg_ctx && in_msg_ctx)
{
- /*TODO:error - completed*/
- return AXIS2_FAILURE;
+ /* may be this is the second invocation using the same service clinet,
+ so reset */
+ /* TODO: Fix the memory leaks here */
+ axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING, NULL);
+ axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, NULL);
+ AXIS2_OP_CTX_SET_IS_COMPLETE(op_client_impl->op_ctx, env, AXIS2_FALSE);
+ out_msg_ctx = NULL;
+ in_msg_ctx = NULL;
}
if (!out_msg_ctx)
Modified: webservices/axis2/trunk/c/modules/core/context/ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/ctx.c?view=diff&rev=440825&r1=440824&r2=440825
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/ctx.c Wed Sep 6 11:38:09 2006
@@ -341,8 +341,11 @@
val = NULL;
key = NULL;
}
- axis2_hash_free(ctx_impl->non_persistent_map, env);
- ctx_impl->non_persistent_map = NULL;
+ if (ctx_impl->non_persistent_map != map) /* handle repeated invocation case */
+ {
+ axis2_hash_free(ctx_impl->non_persistent_map, env);
+ ctx_impl->non_persistent_map = NULL;
+ }
}
ctx_impl->non_persistent_map = map;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org