axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r439932 - in /webservices/axis2/trunk/c: include/axis2_svc_client.h modules/core/clientapi/svc_client.c
Date Mon, 04 Sep 2006 05:21:03 GMT
Author: nandika
Date: Sun Sep  3 22:21:02 2006
New Revision: 439932

URL: http://svn.apache.org/viewvc?view=rev&rev=439932
Log:
get_op_client method added

Modified:
    webservices/axis2/trunk/c/include/axis2_svc_client.h
    webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c

Modified: webservices/axis2/trunk/c/include/axis2_svc_client.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc_client.h?view=diff&rev=439932&r1=439931&r2=439932
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_client.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_client.h Sun Sep  3 22:21:02 2006
@@ -372,6 +372,18 @@
                 free_fn)(
                     axis2_svc_client_t *svc_client,
                     const axis2_env_t *env);
+
+        /**
+         * Gets the operation client
+         * @param svc_client pointer to service_client struct
+         * @param env env pointer to environemt struct
+         * @return pointer to service context struct. service client owns 
+         * the returned pointer
+         */
+        axis2_op_client_t *(AXIS2_CALL *
+                get_op_client)(
+                    const axis2_svc_client_t *svc_client,
+                    const axis2_env_t *env);
     };
 
     /**
@@ -561,6 +573,12 @@
     @sa axis2_svc_client_ops#free_fn */
 #define AXIS2_SVC_CLIENT_FREE(svc_client, env) \
         ((svc_client)->ops->free_fn(svc_client, env))
+        
+/** Gets the op_client .
+    @sa axis2_svc_client_ops#get_op_client */
+    #define AXIS2_SVC_CLIENT_GET_OP_CLIENT(svc_client, env) \
+            ((svc_client)->ops->get_op_client(svc_client, env))
+
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?view=diff&rev=439932&r1=439931&r2=439932
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Sun Sep  3 22:21:02 2006
@@ -211,6 +211,12 @@
     axis2_svc_client_t *svc_client,
     const axis2_env_t *env);
 
+axis2_op_client_t *AXIS2_CALL
+axis2_svc_client_get_op_client(
+    const axis2_svc_client_t *svc_client,
+    const axis2_env_t *env);
+
+
 axis2_svc_client_t *AXIS2_CALL
 axis2_svc_client_create(
     const axis2_env_t *env,
@@ -675,7 +681,15 @@
     {
         return AXIS2_FAILURE;
     }
-
+    if(NULL != svc_client_impl->op_client)
+    {
+        /** free op_client of previous message 
+            AXIS2_OP_CLIENT_FREE(svc_client_impl->op_client);
+        */            
+    }
+    
+    svc_client_impl->op_client = op_client;
+    
     AXIS2_OP_CLIENT_ADD_MSG_CTX(op_client, env, msg_ctx);
     return AXIS2_OP_CLIENT_EXECUTE(op_client, env, AXIS2_TRUE);
 }
@@ -715,6 +729,14 @@
     {
         return;
     }
+    
+    if(NULL != svc_client_impl->op_client)
+    {
+        /** free previous op_client 
+            AXIS2_OP_CLIENT_FREE(op_client, env);
+        */
+    }
+    svc_client_impl->op_client = op_client;
 
     AXIS2_OP_CLIENT_ADD_MSG_CTX(op_client, env, msg_ctx);
     AXIS2_OP_CLIENT_EXECUTE(op_client, env, AXIS2_FALSE);
@@ -849,10 +871,17 @@
         {
             return NULL;
         }
-
+        if(NULL != svc_client_impl->op_client)
+        {
+            /** free op_client of previous request 
+            AXIS2_OP_CLIENT_FREE(svc_client_impl->op_client);
+            */
+        }
+        svc_client_impl->op_client = op_client;
+        
         AXIS2_OP_CLIENT_ADD_MSG_CTX(op_client, env, msg_ctx);
         AXIS2_OP_CLIENT_EXECUTE(op_client, env, AXIS2_TRUE);
-        res_msg_ctx = (axis2_msg_ctx_t *)AXIS2_OP_CTX_GET_MSG_CTX(op_client, env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
+        res_msg_ctx = (axis2_msg_ctx_t *)AXIS2_OP_CLIENT_GET_MSG_CTX(op_client, env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
 
         if (!res_msg_ctx)
         {
@@ -913,6 +942,13 @@
     {
         return;
     }
+    if(NULL != svc_client_impl->op_client)
+    {
+        /** free op_client of previous request 
+        AXIS2_OP_CLIENT_FREE(svc_client_impl->op_client, env);
+        */
+    }
+    svc_client_impl->op_client = op_client;
 
     AXIS2_OP_CLIENT_SET_CALLBACK(op_client, env, callback);
     AXIS2_OP_CLIENT_ADD_MSG_CTX(op_client, env, msg_ctx);
@@ -1164,6 +1200,7 @@
     svc_client->ops->set_target_endpoint_ref = axis2_svc_client_set_target_endpoint_ref;
     svc_client->ops->get_svc_ctx = axis2_svc_client_get_svc_ctx;
     svc_client->ops->free_fn = axis2_svc_client_free;
+    svc_client->ops->get_op_client = axis2_svc_client_get_op_client;
 }
 
 static axis2_svc_t * 
@@ -1398,3 +1435,12 @@
 
     return AXIS2_TRUE;
 }
+
+
+axis2_op_client_t *AXIS2_CALL
+axis2_svc_client_get_op_client(
+    const axis2_svc_client_t *svc_client,
+    const axis2_env_t *env)
+{
+    return AXIS2_INTF_TO_IMPL(svc_client)->op_client;    
+}        



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message