axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r419170 - in /webservices/axis2/trunk/c: include/axis2_op_client.h include/axis2_svc_client.h modules/core/clientapi/op_client.c
Date Wed, 05 Jul 2006 05:47:05 GMT
Author: samisa
Date: Tue Jul  4 22:47:04 2006
New Revision: 419170

URL: http://svn.apache.org/viewvc?rev=419170&view=rev
Log:
Adding more doc comment stuff

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

Modified: webservices/axis2/trunk/c/include/axis2_op_client.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op_client.h?rev=419170&r1=419169&r2=419170&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op_client.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op_client.h Tue Jul  4 22:47:04 2006
@@ -1,45 +1,36 @@
 /*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 
 #ifndef AXIS2_OP_CLIENT_H
 #define AXIS2_OP_CLIENT_H
 
+
+
 /**
  * @defgroup axis2_client_api client API
  * @ingroup axis2
  * @{
- * @} 
+ * @}
  */
 
-
 /**
- * An operation client is the way an advanced user interacts with Axis2. Actual
- * operation clients understand a specific MEP and hence their behavior is
- * defined by their MEP. To interact with an operation client, you first get one
- * from a specific axis2_op_t. Then you set the messages into it one by one
- * (whatever is available). Then, when you call execute() the client will
- * execute what it can at that point. If executing the operation client results
- * in a new message being created, then if a message receiver is registered with
- * the client then the message will be delivered to that client.
+ * @file axis2_op_client.h
+ * @brief axis2 operation client interface
  */
 
-/**
-  * @file axis2_op_client.h
-  * @brief axis2 Operation Client interface
-  */
 
 #include <axis2_defines.h>
 #include <axis2_env.h>
@@ -52,162 +43,200 @@
 {
 #endif
 
-/** @defgroup axis2_op_client operation client 
- * @ingroup axis2_client_api
- * @{
- */
-    
-typedef struct axis2_op_client_ops axis2_op_client_ops_t;
-typedef struct axis2_op_client axis2_op_client_t; 
-struct axis2_callback_recv;
-    
-/** 
- * @brief Operation Client ops struct
- * Encapsulator struct for ops of axis2_op_client
- */  
-struct axis2_op_client_ops
-{
-
-   /**
-     * Sets the options that should be used for this particular client. This
-     * resets the entire set of options to use the new options - so you'd lose
-     * any option cascading that may have been set up.
-     *
-     * @param options the options
+    /** @defgroup axis2_op_client operation client
+     * @ingroup axis2_client_api
+     * Operation client is meant to be used by advanced users to consume services.
+     * Operation client understands a specific MEP and hence the behavior is
+     * defined by the MEP. To consume services with an operation client, an
+     * operation (of type axis2_op_t) and a service context (of type axis2_svc_ctx_t)
+     * has to be provided along with options to be used. The execute() function
+     * can be used to send the request and get the response. 
+     * The service client implementation uses the operation client and provides an
+     * easy to use API for consuming services. Hence the service client 
+     * implementation is a very good example of how to use the operation client API.
+     * @sa axis2_svc_client
+     * @{
      */
-   axis2_status_t (AXIS2_CALL *
-   set_options)(struct axis2_op_client *op_client,
-               const axis2_env_t *env,
-               axis2_options_t *options);
 
+    /** Type name for struct axis2_op_client_ops */
+    typedef struct axis2_op_client_ops axis2_op_client_ops_t;
+    /** Type name for struct axis2_op_client */
+    typedef struct axis2_op_client axis2_op_client_t;
+        
+    struct axis2_callback_recv;
 
     /**
-     * Return the options used by this client. If you want to set a single
-     * option, then the right way is to do get_options() and set specific
-     * options.
-     *
-     * @return the options, which will never be null.
+     * operation client ops struct.
+     * Encapsulator struct for ops of axis2_op_client.
      */
-   axis2_options_t* (AXIS2_CALL *
-   get_options)(struct axis2_op_client *op_client,
-               const axis2_env_t *env);
+    struct axis2_op_client_ops
+    {
 
-    /**
-     * Add a message context to the client for processing. This method must not
-     * process the message - it only records it in the operation client.
-     * Processing only occurs when execute() is called.
-     *
-     * @param mc the message context
-     */
-   axis2_status_t (AXIS2_CALL *
-   add_msg_ctx)(struct axis2_op_client *op_client,
-                  const axis2_env_t *env,
-                  axis2_msg_ctx_t *mc);
-
-   /**
-     * Return a message from the client - will return null if the requested
-     * message is not available.
-     *
-     * @param message_label the message label of the desired message context
-     * @return the desired message context or null if its not available.
-     */
-   axis2_msg_ctx_t* (AXIS2_CALL *
-   get_msg_ctx)(struct axis2_op_client *op_client,
-                     const axis2_env_t *env,
-                     const axis2_char_t *message_label);
+        /**
+          * Sets the options that should be used for this particular client. 
+          * @param op_client pointer to operation client struct
+          * @param env pointer to environment struct
+          * @param options pointer to options struct to be set
+          * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+          */
+        axis2_status_t (AXIS2_CALL *
+                set_options)(axis2_op_client_t *op_client,
+                        const axis2_env_t *env,
+                        const axis2_options_t *options);
+
+        /**
+         * Gets options used by operation client. 
+         * @param op_client pointer to operation client struct
+         * @param env pointer to environment struct
+         * @return a pointer to the options struct if options set, else NULL.
+         * Returns a reference, not a cloned copy.         
+         */
+        const axis2_options_t* (AXIS2_CALL *
+                get_options)(const axis2_op_client_t *op_client,
+                        const axis2_env_t *env);
+
+        /**
+         * Adds a message context to the client for processing. 
+         * This method must not process the message, it only records
+         * the message in the operation client.
+         * Processing occurs only when execute() is called.
+         * @param op_client pointer to operation client struct
+         * @param env pointer to environment struct
+         * @param mc message context to be added
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                add_msg_ctx)(axis2_op_client_t *op_client,
+                        const axis2_env_t *env,
+                        axis2_msg_ctx_t *mc);
+
+        /**
+         * Gets a message corresponding to the given label.
+         * @param op_client pointer to operation client struct
+         * @param env pointer to environment struct
+         * @param message_label the message label of the desired message context
+         * @return the desired message context or NULL if its not available.
+         * Returns a reference, not a cloned copy.
+         */
+        const axis2_msg_ctx_t* (AXIS2_CALL *
+                get_msg_ctx)(const axis2_op_client_t *op_client,
+                        const axis2_env_t *env,
+                        const axis2_char_t *message_label);
+
+        /**
+         * Sets the callback to be executed when a response message is received. 
+         * @param op_client pointer to operation client struct
+         * @param env pointer to environment struct
+         * @param callback the callback to be used
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_callback)(axis2_op_client_t *op_client,
+                        const axis2_env_t *env,
+                        axis2_callback_t *callback);
+
+        /**
+         * Execute the MEP. What this does depends on the specific operation client.
+         * The basic idea is to have the operation client execute and do something
+         * with the messages that have been added to it so far. For example, if its
+         * an Out-In MEP, then if the Out message has been set, then executing the
+         * client asks it to send the message and get the In message, possibly using
+         * a different thread.
+         *
+         * @param block Indicates whether execution should block or return ASAP. What
+         *              block means is of course a function of the specific operation
+         *              client.
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                execute)(struct axis2_op_client *op_client,
+                        const axis2_env_t *env,
+                        axis2_bool_t block);
+
+        /**
+         * Reset the operation client to a clean status after the MEP has completed.
+         * This is how you can reuse an operation client. NOTE: this does not reset
+         * the options; only the internal state so the client can be used again.
+         *
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                reset)(struct axis2_op_client *op_client,
+                        const axis2_env_t *env);
+
+        /**
+         * To close the tranport if necessary , can call this method. The most usage of thie method
+         * when clinet use two tarnport for sending and receiving , there we need to remove entry from
+         * waitings calls in the transport listener queue
+         * Note : DO NOT call this method if you are not using two transport send and receive
+         *
+         * @param mc : axis2_msg_ctx_t# which have all the trnport information
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                compelete)(struct axis2_op_client *op_client,
+                        const axis2_env_t *env,
+                        axis2_msg_ctx_t *mc);
+
+        /**
+          * To get the operation context of the operation cleint
+          * @return Operation Context
+          */
+        axis2_op_ctx_t* (AXIS2_CALL *
+                get_operation_context)(struct axis2_op_client *op_client);
+
+        /**
+          *
+          * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+          */
+        axis2_status_t (AXIS2_CALL *
+                set_callback_recv)(
+                    struct axis2_op_client *op_client,
+                    const axis2_env_t *env,
+                    struct axis2_callback_recv *callback_recv);
+
+        /**
+          *
+          * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+          */
+        axis2_status_t (AXIS2_CALL *
+                free)(struct axis2_op_client *op_client,
+                        const axis2_env_t *env);
+    };
 
     /**
-     * Set the callback to be executed when a message comes into the MEP and the
-     * operation client is executed. This is the way the operation client
-     * provides notification that a message has been received by it. Exactly
-     * when its executed and under what conditions is a function of the specific
-     * operation client.
-     *
-     * @param callback the callback to be used when the client decides its time to
-     *                 use it
+     * operation client struct.
      */
-   axis2_status_t (AXIS2_CALL *
-   set_callback)(struct axis2_op_client *op_client,
-               const axis2_env_t *env,
-               axis2_callback_t *callback);
+    struct axis2_op_client
+    {
+        axis2_op_client_ops_t *ops;
+    };
 
     /**
-     * Execute the MEP. What this does depends on the specific operation client.
-     * The basic idea is to have the operation client execute and do something
-     * with the messages that have been added to it so far. For example, if its
-     * an Out-In MEP, then if the Out message has been set, then executing the
-     * client asks it to send the message and get the In message, possibly using
-     * a different thread.
-     *
-     * @param block Indicates whether execution should block or return ASAP. What
-     *              block means is of course a function of the specific operation
-     *              client.
+     * Creates a operation client struct for a specified operation, service 
+     * context and options.
+     * @param env pointer to environment struct
+     * @param op pointer to operation struct corrsponding to the operation to 
+     * to be executed. Newly created client assumes ownership of the operation.
+     * @param svc_ctx pointer to service context struct representing the service
+     * to be consumed. Newly created client assumes ownership of the service 
+     * context.
+     * @param options pointer to options struct to be used.
+     * @return a pointer to newly created operation client struct,
+     *         or NULL on error with error code set in environment's error
      */
-   axis2_status_t (AXIS2_CALL *
-   execute)(struct axis2_op_client *op_client,
-            const axis2_env_t *env,
-            axis2_bool_t block);
-
-    /**
-     * Reset the operation client to a clean status after the MEP has completed.
-     * This is how you can reuse an operation client. NOTE: this does not reset
-     * the options; only the internal state so the client can be used again.
-     *
-     */
-   axis2_status_t (AXIS2_CALL *
-   reset)(struct axis2_op_client *op_client,
-            const axis2_env_t *env);
-
-    /**
-     * To close the tranport if necessary , can call this method. The most usage of thie method
-     * when clinet use two tarnport for sending and receiving , there we need to remove entry from
-     * waitings calls in the transport listener queue
-     * Note : DO NOT call this method if you are not using two transport send and receive
-     *
-     * @param mc : axis2_msg_ctx_t# which have all the trnport information
-     */
-   axis2_status_t (AXIS2_CALL *
-   compelete)(struct axis2_op_client *op_client,
-            const axis2_env_t *env,
-            axis2_msg_ctx_t *mc);
-
-   /**
-     * To get the operation context of the operation cleint
-     * @return Operation Context
-     */
-   axis2_op_ctx_t* (AXIS2_CALL *
-   get_operation_context)(struct axis2_op_client *op_client);
-
-    axis2_status_t (AXIS2_CALL *
-    set_callback_recv)(
-        struct axis2_op_client *op_client, 
-        const axis2_env_t *env,
-        struct axis2_callback_recv *callback_recv);
-
-   axis2_status_t (AXIS2_CALL *
-   free)(struct axis2_op_client *op_client,
-            const axis2_env_t *env);
-};
-
-/** 
- * @brief Operation Client struct
-  *   Axis2 Operation Client
- */
-struct axis2_op_client
-{
-    axis2_op_client_ops_t *ops;    
-};
-
-AXIS2_EXTERN axis2_op_client_t* AXIS2_CALL axis2_op_client_create(const axis2_env_t *env,
-                                          axis2_op_t *op,
-                                          axis2_svc_ctx_t *svc_ctx,
-                                          axis2_options_t *options);
-    
-/************************** Start of function macros **************************/
+    AXIS2_EXTERN axis2_op_client_t* AXIS2_CALL axis2_op_client_create(const axis2_env_t *env,
+            axis2_op_t *op,
+            axis2_svc_ctx_t *svc_ctx,
+            axis2_options_t *options);
 
+/** Sets the options to be used by operation client. 
+    @sa axis2_op_client_ops#set_options */
 #define AXIS2_OP_CLIENT_SET_OPTIONS(op_client, env, options) \
       ((op_client)->ops->set_options(op_client, env, options))
 
+/** Gets the options used by operation client. 
+    @sa axis2_op_client_ops#get_options */
 #define AXIS2_OP_CLIENT_GET_OPTIONS(op_client, env) \
       ((op_client)->ops->get_options(op_client, env))
 
@@ -238,9 +267,9 @@
 #define AXIS2_OP_CLIENT_SET_CALLBACK_RECV(op_client, env, callback_recv) \
       ((op_client)->ops->set_callback_recv(op_client, env, callback_recv))
 
-/************************** End of function macros ****************************/    
+    /************************** End of function macros ****************************/
 
-/** @} */
+    /** @} */
 #ifdef __cplusplus
 }
 #endif

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?rev=419170&r1=419169&r2=419170&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_client.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_client.h Tue Jul  4 22:47:04 2006
@@ -17,21 +17,27 @@
 #ifndef AXIS2_SVC_CLIENT_H
 #define AXIS2_SVC_CLIENT_H
 
+/**
+ * @defgroup axis2_svc_client service client
+ * @ingroup axis2_client_api
+ * The service client interface serves as the primary client
+ * interface for consuming services. You can set the options to be
+ * used by the service client and then invoke an operation on a given
+ * service. There are several ways of invoking a service operation,
+ * which are based on the concept of a message exchange pattern
+ * (MEP). The two basic MEPs supported by service client are out-only
+ * and out-in. Each MEP can be used in either blocking or
+ * non-blocking mode. The operation invocations using the service
+ * client API are based on the XML-in/XML-out principle: both the
+ * payload to be sent to the service and the result from the service
+ * are in XML, represented in AXIOM.
+ * @{
+ */
+
 
 /**
-  * @file axis2_svc_client.h
-  * The service client interface serves as the primary client
-  * interface for consuming services. You can set the options to be
-  * used by the service client and then invoke an operation on a given
-  * service. There are several ways of invoking a service operation,
-  * which are based on the concept of a message exchange pattern
-  * (MEP). The two basic MEPs supported by service client are out-only
-  * and out-in. Each MEP can be used in either blocking or
-  * non-blocking mode. The operation invocations using the service
-  * client API are based on the XML-in/XML-out principle: both the
-  * payload to be sent to the service and the result from the service
-  * are in XML, represented in AXIOM.
-  */
+ * @file axis2_svc_client.h
+ */
 
 #include <axis2_defines.h>
 #include <axis2_env.h>
@@ -63,12 +69,6 @@
 {
 #endif
 
-    /**
-     * @defgroup axis2_svc_client service client
-     * @ingroup axis2_client_api
-     * @{
-     */
-
     /** Type name for struct axis2_svc_client_ops */
     typedef struct axis2_svc_client_ops axis2_svc_client_ops_t;
     /** Type name for struct axis2_svc_client */
@@ -76,7 +76,7 @@
 
 
     /**
-     * service client ops struct
+     * service client ops struct.
      * Encapsulator struct for operations of axis2_svc_client
      */
     struct axis2_svc_client_ops
@@ -374,7 +374,7 @@
     };
 
     /**
-     * Service client struct
+     * service client struct. 
      */
     struct axis2_svc_client
     {

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?rev=419170&r1=419169&r2=419170&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Tue Jul  4 22:47:04 2006
@@ -1,18 +1,18 @@
 /*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 
 #include <axis2_op_client.h>
 #include <axis2_const.h>
@@ -29,21 +29,22 @@
     /** op_client base struct */
     axis2_op_client_t op_client;
 
-   axis2_mep_client_t *base;
+    axis2_mep_client_t *base;
 
-   axis2_svc_ctx_t *svc_ctx;
+    axis2_svc_ctx_t *svc_ctx;
 
-   axis2_options_t *options;
+    axis2_options_t *options;
 
-   axis2_op_ctx_t *op_ctx;
+    axis2_op_ctx_t *op_ctx;
 
-   axis2_callback_t *callback;
+    axis2_callback_t *callback;
 
-   axis2_bool_t completed;
+    axis2_bool_t completed;
     /* to hold the locally created async result */
     axis2_async_result_t *async_result;
     axis2_callback_recv_t *callback_recv;
-} axis2_op_client_impl_t;
+}
+axis2_op_client_impl_t;
 
 /** Interface to implementation conversion macro */
 #define AXIS2_INTF_TO_IMPL(op_client) ((axis2_op_client_impl_t *)op_client)
@@ -55,7 +56,8 @@
     axis2_callback_t *callback;
     axis2_op_t *op;
     axis2_msg_ctx_t *msg_ctx;
-} axis2_op_client_worker_func_args_t;
+}
+axis2_op_client_worker_func_args_t;
 
 void * AXIS2_THREAD_FUNC
 axis2_op_client_worker_func(axis2_thread_t *thd, void *data);
@@ -65,308 +67,308 @@
 static void axis2_op_client_init_ops(axis2_op_client_t *op_client);
 
 /** public function prototypes */
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_set_options(struct axis2_op_client *op_client,
-                             const axis2_env_t *env,
-                             axis2_options_t *options);
+        const axis2_env_t *env,
+        axis2_options_t *options);
 
-axis2_options_t* AXIS2_CALL 
+axis2_options_t* AXIS2_CALL
 axis2_op_client_get_options(struct axis2_op_client *op_client,
-                             const axis2_env_t *env);
+        const axis2_env_t *env);
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_add_msg_ctx(struct axis2_op_client *op_client,
-                                    const axis2_env_t *env,
-                                    axis2_msg_ctx_t *mc);
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *mc);
 
 
-axis2_msg_ctx_t* AXIS2_CALL 
+axis2_msg_ctx_t* AXIS2_CALL
 axis2_op_client_get_msg_ctx(struct axis2_op_client *op_client,
-                                     const axis2_env_t *env,
-                                     const axis2_char_t *message_label);
+        const axis2_env_t *env,
+        const axis2_char_t *message_label);
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_set_callback(struct axis2_op_client *op_client,
-                             const axis2_env_t *env,
-                             axis2_callback_t *callback);
+        const axis2_env_t *env,
+        axis2_callback_t *callback);
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_execute(struct axis2_op_client *op_client,
-                         const axis2_env_t *env,
-                         axis2_bool_t block);
+        const axis2_env_t *env,
+        axis2_bool_t block);
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_reset(struct axis2_op_client *op_client,
-                  const axis2_env_t *env);
+        const axis2_env_t *env);
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_compelete(struct axis2_op_client *op_client,
-                         const axis2_env_t *env,
-                         axis2_msg_ctx_t *mc);
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *mc);
 
-axis2_op_ctx_t* AXIS2_CALL 
+axis2_op_ctx_t* AXIS2_CALL
 axis2_op_client_get_operation_context(struct axis2_op_client *op_client);
 
 axis2_status_t AXIS2_CALL
-axis2_op_client_set_callback_recv(struct axis2_op_client *op_client, 
-    const axis2_env_t *env,
-    axis2_callback_recv_t *callback_recv);
+axis2_op_client_set_callback_recv(struct axis2_op_client *op_client,
+        const axis2_env_t *env,
+        axis2_callback_recv_t *callback_recv);
 
 axis2_status_t AXIS2_CALL
-axis2_op_client_free(struct axis2_op_client *op_client, 
-                  const axis2_env_t *env);
+axis2_op_client_free(struct axis2_op_client *op_client,
+        const axis2_env_t *env);
 
-axis2_op_client_t* AXIS2_CALL 
+axis2_op_client_t* AXIS2_CALL
 axis2_op_client_create(const axis2_env_t *env, axis2_op_t *op,
-                  axis2_svc_ctx_t *svc_ctx,
-                  axis2_options_t *options)
+        axis2_svc_ctx_t *svc_ctx,
+        axis2_options_t *options)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
-   axis2_char_t *mep_uri = NULL;
-    
+    axis2_char_t *mep_uri = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, op, NULL);
     AXIS2_PARAM_CHECK(env->error, svc_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, options, NULL);
-    
+
     op_client_impl = AXIS2_MALLOC( env->allocator, sizeof(axis2_op_client_impl_t) );
     if (!op_client_impl)
-    { 
+    {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;        
+        return NULL;
     }
 
-   /** initialize data */
+    /** initialize data */
     op_client_impl->base = NULL;
-   op_client_impl->svc_ctx = NULL;
-   op_client_impl->options = NULL;
-   op_client_impl->op_ctx = NULL;
+    op_client_impl->svc_ctx = NULL;
+    op_client_impl->options = NULL;
+    op_client_impl->op_ctx = NULL;
     op_client_impl->callback = NULL;
     op_client_impl->completed = AXIS2_FALSE;
     op_client_impl->async_result = NULL;
     op_client_impl->callback_recv = NULL;
-    
-   op_client_impl->options = options;
-   op_client_impl->svc_ctx = svc_ctx;
-    
-    op_client_impl->op_ctx = axis2_op_ctx_create(env, op, 
-        op_client_impl->svc_ctx);
+
+    op_client_impl->options = options;
+    op_client_impl->svc_ctx = svc_ctx;
+
+    op_client_impl->op_ctx = axis2_op_ctx_create(env, op,
+            op_client_impl->svc_ctx);
     if (!(op_client_impl->op_ctx))
     {
         axis2_op_client_free(&(op_client_impl->op_client), env);
-      return NULL;
+        return NULL;
     }
-    
-   mep_uri = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
 
-   if (!mep_uri)
-   {
-      axis2_op_client_free(&(op_client_impl->op_client), env);
-      return NULL;
-   }
+    mep_uri = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+
+    if (!mep_uri)
+    {
+        axis2_op_client_free(&(op_client_impl->op_client), env);
+        return NULL;
+    }
 
-   op_client_impl->base = axis2_mep_client_create(env, svc_ctx, mep_uri);
+    op_client_impl->base = axis2_mep_client_create(env, svc_ctx, mep_uri);
     if (!(op_client_impl->base))
     {
         axis2_op_client_free(&(op_client_impl->op_client), env);
         return NULL;
     }
 
-    /* initialize ops */    
-    op_client_impl->op_client.ops  = 
+    /* initialize ops */
+    op_client_impl->op_client.ops =
         AXIS2_MALLOC( env->allocator, sizeof(axis2_op_client_ops_t) );
-    
+
     if (!op_client_impl->op_client.ops)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_CALLBACK_FREE(&(op_client_impl->op_client), env);
-        return NULL;        
+        return NULL;
     }
 
-   axis2_op_client_init_ops(&(op_client_impl->op_client));
+    axis2_op_client_init_ops(&(op_client_impl->op_client));
     /** initialize parser for thread safty */
     axiom_xml_reader_init();
-   return &(op_client_impl->op_client);
+    return &(op_client_impl->op_client);
 }
 
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_set_options(struct axis2_op_client *op_client,
-                             const axis2_env_t *env,
-                             axis2_options_t *options)
+        const axis2_env_t *env,
+        axis2_options_t *options)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-   
-   if (op_client_impl->options)
-   {
-      AXIS2_OPTIONS_FREE(op_client_impl->options, env);
-   }
-   op_client_impl->options = options;
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   return AXIS2_SUCCESS;   
+    if (op_client_impl->options)
+    {
+        AXIS2_OPTIONS_FREE(op_client_impl->options, env);
+    }
+    op_client_impl->options = options;
+
+    return AXIS2_SUCCESS;
 }
 
-axis2_options_t* AXIS2_CALL 
+axis2_options_t* AXIS2_CALL
 axis2_op_client_get_options(struct axis2_op_client *op_client,
-                             const axis2_env_t *env)
+        const axis2_env_t *env)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-   
-   return op_client_impl->options;   
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+    return op_client_impl->options;
 }
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_add_msg_ctx(struct axis2_op_client *op_client,
-                                    const axis2_env_t *env,
-                                    axis2_msg_ctx_t *mc)
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *mc)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
     axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
-   axis2_hash_t *msg_ctx_map = NULL;
+    axis2_hash_t *msg_ctx_map = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-   
-   msg_ctx_map = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_client_impl->op_ctx, env);
-
-   out_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, 
-                           AXIS2_HASH_KEY_STRING);
-   in_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE,
-                           AXIS2_HASH_KEY_STRING);
-
-   if (out_msg_ctx && in_msg_ctx)
-   {
-      /*TODO:error - completed*/
-      return AXIS2_FAILURE;
-   }
-
-   if (!out_msg_ctx)
-   {
-      axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING, mc);
-   }
-   else
-   {
-      axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, mc);
-      AXIS2_OP_CTX_SET_IS_COMPLETE(op_client_impl->op_ctx, env, AXIS2_TRUE);
-   }
-   return AXIS2_SUCCESS;
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+    msg_ctx_map = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_client_impl->op_ctx, env);
+
+    out_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE,
+            AXIS2_HASH_KEY_STRING);
+    in_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE,
+            AXIS2_HASH_KEY_STRING);
+
+    if (out_msg_ctx && in_msg_ctx)
+    {
+        /*TODO:error - completed*/
+        return AXIS2_FAILURE;
+    }
+
+    if (!out_msg_ctx)
+    {
+        axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING, mc);
+    }
+    else
+    {
+        axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, mc);
+        AXIS2_OP_CTX_SET_IS_COMPLETE(op_client_impl->op_ctx, env, AXIS2_TRUE);
+    }
+    return AXIS2_SUCCESS;
 }
 
 
-axis2_msg_ctx_t* AXIS2_CALL 
+axis2_msg_ctx_t* AXIS2_CALL
 axis2_op_client_get_msg_ctx(struct axis2_op_client *op_client,
-                                     const axis2_env_t *env,
-                                     const axis2_char_t *message_label)
+        const axis2_env_t *env,
+        const axis2_char_t *message_label)
 {
 
     axis2_op_client_impl_t *op_client_impl = NULL;
-    
+
     AXIS2_ENV_CHECK(env, NULL);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   if (!message_label)
-   {
+    if (!message_label)
+    {
         /*AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);*/
-      return NULL;
-   }
-   return AXIS2_OP_CTX_GET_MSG_CTX(op_client_impl->op_ctx, env, message_label); 
+        return NULL;
+    }
+    return AXIS2_OP_CTX_GET_MSG_CTX(op_client_impl->op_ctx, env, message_label);
 }
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_set_callback(struct axis2_op_client *op_client,
-                             const axis2_env_t *env,
-                             axis2_callback_t *callback)
+        const axis2_env_t *env,
+        axis2_callback_t *callback)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   if (op_client_impl->callback)
-   {
-      AXIS2_CALLBACK_FREE(op_client_impl->callback, env);
-   }
+    if (op_client_impl->callback)
+    {
+        AXIS2_CALLBACK_FREE(op_client_impl->callback, env);
+    }
 
-   op_client_impl->callback = callback;   
-   return AXIS2_SUCCESS;
+    op_client_impl->callback = callback;
+    return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_execute(struct axis2_op_client *op_client,
-                         const axis2_env_t *env,
-                         axis2_bool_t block)
+        const axis2_env_t *env,
+        axis2_bool_t block)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
-      axis2_conf_ctx_t *conf_ctx = NULL;
-      axis2_msg_ctx_t *msg_ctx = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_msg_ctx_t *msg_ctx = NULL;
 
-   axis2_transport_out_desc_t *transport_out = NULL;
-   axis2_transport_in_desc_t *transport_in = NULL;
+    axis2_transport_out_desc_t *transport_out = NULL;
+    axis2_transport_in_desc_t *transport_in = NULL;
+
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_op_t *op = NULL;
+    axis2_char_t *msg_id = NULL;
 
-   axis2_status_t status = AXIS2_FAILURE;
-   axis2_op_t *op = NULL;
-   axis2_char_t *msg_id = NULL;
-   
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    
+
     op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   if (op_client_impl->completed)
-   {
-      /**TODO:error completed*/
-      return AXIS2_FAILURE;
-   }
-   
-   conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
-   msg_ctx = axis2_op_client_get_msg_ctx(op_client, env, 
-      AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE); 
-
-   if (!msg_ctx)
-   {
-      /*TODO:error msg ctx is null*/
-      return AXIS2_FAILURE;
-   }
-   
-   AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, op_client_impl->options);
-   
-   /** 
-   if the transport to use for sending is not specified, try to find it
-    from the URL
-   */
-   transport_out = AXIS2_OPTIONS_GET_TRANSPORT_OUT(op_client_impl->options,
-                  env);
-   if (!transport_out)
-   {
-      axis2_endpoint_ref_t *to_epr = NULL;
-      to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
-      if (!to_epr)
-         to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
-      transport_out = AXIS2_MEP_CLIENT_INFER_TRANSPORT(op_client_impl->base, env, to_epr);
-   }
-   
-   if (!transport_out)
-   {
-      return AXIS2_FAILURE;
-   }
-
-   if (!(AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env)))
-      AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(msg_ctx, env, transport_out);
-        
-
-   transport_in = AXIS2_OPTIONS_GET_TRANSPORT_IN(op_client_impl->options, env);
-   if (!transport_in)
-   {
+    if (op_client_impl->completed)
+    {
+        /**TODO:error completed*/
+        return AXIS2_FAILURE;
+    }
+
+    conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
+    msg_ctx = axis2_op_client_get_msg_ctx(op_client, env,
+            AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE);
+
+    if (!msg_ctx)
+    {
+        /*TODO:error msg ctx is null*/
+        return AXIS2_FAILURE;
+    }
+
+    AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, op_client_impl->options);
+
+    /**
+    if the transport to use for sending is not specified, try to find it
+     from the URL
+    */
+    transport_out = AXIS2_OPTIONS_GET_TRANSPORT_OUT(op_client_impl->options,
+            env);
+    if (!transport_out)
+    {
+        axis2_endpoint_ref_t *to_epr = NULL;
+        to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
+        if (!to_epr)
+            to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
+        transport_out = AXIS2_MEP_CLIENT_INFER_TRANSPORT(op_client_impl->base, env, to_epr);
+    }
+
+    if (!transport_out)
+    {
+        return AXIS2_FAILURE;
+    }
+
+    if (!(AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env)))
+        AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(msg_ctx, env, transport_out);
+
+
+    transport_in = AXIS2_OPTIONS_GET_TRANSPORT_IN(op_client_impl->options, env);
+    if (!transport_in)
+    {
         axis2_conf_ctx_t *conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
         if (conf_ctx)
         {
@@ -378,38 +380,38 @@
             }
         }
     }
-   
-   if (!(AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(msg_ctx, env)))
+
+    if (!(AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(msg_ctx, env)))
     {
         AXIS2_MSG_CTX_SET_TRANSPORT_IN_DESC(msg_ctx, env, transport_in);
     }
 
-   op = AXIS2_OP_CTX_GET_OP(op_client_impl->op_ctx, env);
-   if (!op)
-      return AXIS2_FAILURE;
-
-   status = AXIS2_MEP_CLIENT_PREPARE_INVOCATION(op_client_impl->base, env, op, msg_ctx);
-   if (status != AXIS2_SUCCESS)
-      return AXIS2_FAILURE;
-   
-   msg_id = (axis2_char_t*)axis2_uuid_gen(env);
-   AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx, env, msg_id);
-    if(NULL != msg_id)
-    {
-      AXIS2_FREE(env->allocator, msg_id);
-      msg_id = NULL;
-   }      
+    op = AXIS2_OP_CTX_GET_OP(op_client_impl->op_ctx, env);
+    if (!op)
+        return AXIS2_FAILURE;
+
+    status = AXIS2_MEP_CLIENT_PREPARE_INVOCATION(op_client_impl->base, env, op, msg_ctx);
+    if (status != AXIS2_SUCCESS)
+        return AXIS2_FAILURE;
+
+    msg_id = (axis2_char_t*)axis2_uuid_gen(env);
+    AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx, env, msg_id);
+    if (NULL != msg_id)
+    {
+        AXIS2_FREE(env->allocator, msg_id);
+        msg_id = NULL;
+    }
 
-   if (AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(op_client_impl->options, env))
-   {
+    if (AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(op_client_impl->options, env))
+    {
         axis2_engine_t *engine = NULL;
-        
-        AXIS2_CALLBACK_RECV_ADD_CALLBACK(op_client_impl->callback_recv, env, 
-            AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env),
-            op_client_impl->callback);
+
+        AXIS2_CALLBACK_RECV_ADD_CALLBACK(op_client_impl->callback_recv, env,
+                AXIS2_MSG_CTX_GET_MSG_ID(msg_ctx, env),
+                op_client_impl->callback);
         /* TODO: set up reply to */
-        AXIS2_MSG_CTX_SET_OP_CTX(msg_ctx, env, AXIS2_OP_FIND_OP_CTX(op, env, 
-            msg_ctx, op_client_impl->svc_ctx));
+        AXIS2_MSG_CTX_SET_OP_CTX(msg_ctx, env, AXIS2_OP_FIND_OP_CTX(op, env,
+                msg_ctx, op_client_impl->svc_ctx));
         AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);
 
         /* send the message */
@@ -417,55 +419,55 @@
         if (!engine)
             return AXIS2_FAILURE;
         AXIS2_ENGINE_SEND(engine, env, msg_ctx);
-   }
-   else
-   {
-      if (block)
-      {
-           axis2_msg_ctx_t *response_mc = NULL;
-           axis2_char_t *address = NULL;
-           axis2_char_t *epr_address = NULL;
-         axis2_property_t *property = NULL;
-
-           /* Usual Request-Response Sync implemetation */
-           property = axis2_property_create(env);
-           AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
-           epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(
-               AXIS2_OPTIONS_GET_TO(op_client_impl->options, env), env);
-           address = AXIS2_STRDUP(epr_address, env);
-           AXIS2_PROPERTY_SET_VALUE(property, env, address);
-           AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
-                AXIS2_TRANSPORT_URL, property, AXIS2_FALSE);
-           AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);
-           AXIS2_MSG_CTX_SET_CONF_CTX(msg_ctx, env, 
-                AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env));
+    }
+    else
+    {
+        if (block)
+        {
+            axis2_msg_ctx_t *response_mc = NULL;
+            axis2_char_t *address = NULL;
+            axis2_char_t *epr_address = NULL;
+            axis2_property_t *property = NULL;
+
+            /* Usual Request-Response Sync implemetation */
+            property = axis2_property_create(env);
+            AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+            epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(
+                        AXIS2_OPTIONS_GET_TO(op_client_impl->options, env), env);
+            address = AXIS2_STRDUP(epr_address, env);
+            AXIS2_PROPERTY_SET_VALUE(property, env, address);
+            AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+                    AXIS2_TRANSPORT_URL, property, AXIS2_FALSE);
+            AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);
+            AXIS2_MSG_CTX_SET_CONF_CTX(msg_ctx, env,
+                    AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env));
             AXIS2_MSG_CTX_SET_OP_CTX(msg_ctx, env, op_client_impl->op_ctx);
 
             /*Send the SOAP Message and receive a response */
-           response_mc = axis2_mep_client_two_way_send(env, msg_ctx);
-           if (!response_mc)
+            response_mc = axis2_mep_client_two_way_send(env, msg_ctx);
+            if (!response_mc)
             {
                 axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
                 if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
-                    AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+                        AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
                 {
                     return AXIS2_SUCCESS;
                 }
                 else
                     return AXIS2_FAILURE;
             }
-         axis2_op_client_add_msg_ctx(&(op_client_impl->op_client), env, 
-                response_mc);   
-      }
-      else
-      {
+            axis2_op_client_add_msg_ctx(&(op_client_impl->op_client), env,
+                    response_mc);
+        }
+        else
+        {
             axis2_thread_t *worker_thread = NULL;
             axis2_op_client_worker_func_args_t *arg_list = NULL;
-            arg_list = AXIS2_MALLOC(env->allocator, 
-                            sizeof(axis2_op_client_worker_func_args_t));
-            if(NULL == arg_list)
+            arg_list = AXIS2_MALLOC(env->allocator,
+                    sizeof(axis2_op_client_worker_func_args_t));
+            if (NULL == arg_list)
             {
-                return AXIS2_FAILURE;         
+                return AXIS2_FAILURE;
             }
             arg_list->env = env;
             arg_list->op_client_impl = op_client_impl;
@@ -476,112 +478,112 @@
             if (env->thread_pool)
             {
                 worker_thread = AXIS2_THREAD_POOL_GET_THREAD(env->thread_pool,
-                                                 axis2_op_client_worker_func, (void*)arg_list);
-                if(NULL == worker_thread)
+                        axis2_op_client_worker_func, (void*)arg_list);
+                if (NULL == worker_thread)
                 {
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Thread creation failed"
-                                     "call invoke non blocking");
+                            "call invoke non blocking");
                 }
                 AXIS2_THREAD_POOL_THREAD_DETACH(env->thread_pool, worker_thread);
             }
             else
             {
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Thread pool not set in environment."
-                                             " Cannot invoke call non blocking");
+                        " Cannot invoke call non blocking");
             }
 #else
             axis2_op_client_worker_func(NULL, (void*)arg_list);
 #endif
-            
-      }
-   }
-   return AXIS2_SUCCESS;
+
+        }
+    }
+    return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_reset(struct axis2_op_client *op_client,
-                     const axis2_env_t *env)
+        const axis2_env_t *env)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
 
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   if (!op_client_impl->completed)
-      return AXIS2_FAILURE;
+    if (!op_client_impl->completed)
+        return AXIS2_FAILURE;
 
-   op_client_impl->completed = AXIS2_FALSE;
+    op_client_impl->completed = AXIS2_FALSE;
 
-   /*TODO:check
-   if (op_client_impl->op_ctx)
-      AXIS2_OP_CTX_FREE(op_client_impl->op_ctx, env);
-   */
-   op_client_impl->op_ctx = NULL;
+    /*TODO:check
+    if (op_client_impl->op_ctx)
+       AXIS2_OP_CTX_FREE(op_client_impl->op_ctx, env);
+    */
+    op_client_impl->op_ctx = NULL;
 
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL 
+axis2_status_t AXIS2_CALL
 axis2_op_client_compelete(struct axis2_op_client *op_client,
-                         const axis2_env_t *env,
-                         axis2_msg_ctx_t *mc)
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *mc)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
-   axis2_conf_ctx_t *conf_ctx = NULL;
-   axis2_listener_manager_t *listener_manager = NULL;
-   axis2_char_t *transport = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_listener_manager_t *listener_manager = NULL;
+    axis2_char_t *transport = NULL;
 
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(mc, env);
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(mc, env);
 
-   if (!conf_ctx)
-      return AXIS2_FAILURE;
+    if (!conf_ctx)
+        return AXIS2_FAILURE;
 
-   /*TODO:uncomment when implemented
-   listener_manager = AXIS2_CONF_CTX_GET_LISTENER_MANAGER(conf_ctx, env);
-   */
-   if (!listener_manager)
-      return AXIS2_FAILURE;
-   /*TODO:set transport*/
-   return AXIS2_LISTENER_MANAGER_STOP(listener_manager, env, transport);
+    /*TODO:uncomment when implemented
+    listener_manager = AXIS2_CONF_CTX_GET_LISTENER_MANAGER(conf_ctx, env);
+    */
+    if (!listener_manager)
+        return AXIS2_FAILURE;
+    /*TODO:set transport*/
+    return AXIS2_LISTENER_MANAGER_STOP(listener_manager, env, transport);
 }
 
-axis2_op_ctx_t* AXIS2_CALL 
+axis2_op_ctx_t* AXIS2_CALL
 axis2_op_client_get_operation_context(struct axis2_op_client *op_client)
 {
     axis2_op_client_impl_t *op_client_impl = NULL;
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-   
-   return op_client_impl->op_ctx;
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+    return op_client_impl->op_ctx;
 }
-   
+
 axis2_status_t AXIS2_CALL
 axis2_op_client_free(struct axis2_op_client *op_client,
-                              const axis2_env_t *env)
+        const axis2_env_t *env)
 {
-   axis2_op_client_impl_t *op_client_impl = NULL;
+    axis2_op_client_impl_t *op_client_impl = NULL;
 
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
 
-   op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-    
     if (op_client_impl->base)
     {
         AXIS2_MEP_CLIENT_FREE(op_client_impl->base, env);
         op_client_impl->base = NULL;
-    }   
+    }
 
     if (op_client_impl->callback)
     {
         AXIS2_CALLBACK_FREE(op_client_impl->callback, env);
         op_client_impl->callback = NULL;
     }
-   
+
     if (op_client_impl->op_client.ops)
     {
         AXIS2_FREE(env->allocator, op_client_impl->op_client.ops);
@@ -591,23 +593,23 @@
     AXIS2_FREE(env->allocator, op_client_impl);
     op_client_impl = NULL;
     axiom_xml_reader_cleanup();
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 /** private functions - implementation */
 
 static void axis2_op_client_init_ops(axis2_op_client_t *op_client)
 {
-   op_client->ops->set_options = axis2_op_client_set_options;
-   op_client->ops->get_options = axis2_op_client_get_options;
-   op_client->ops->add_msg_ctx = axis2_op_client_add_msg_ctx;
-   op_client->ops->get_msg_ctx = axis2_op_client_get_msg_ctx;
-   op_client->ops->set_callback = axis2_op_client_set_callback;
-   op_client->ops->execute = axis2_op_client_execute;
-   op_client->ops->reset = axis2_op_client_reset;
-   op_client->ops->compelete = axis2_op_client_compelete;
-   op_client->ops->get_operation_context = axis2_op_client_get_operation_context;
+    op_client->ops->set_options = axis2_op_client_set_options;
+    op_client->ops->get_options = axis2_op_client_get_options;
+    op_client->ops->add_msg_ctx = axis2_op_client_add_msg_ctx;
+    op_client->ops->get_msg_ctx = axis2_op_client_get_msg_ctx;
+    op_client->ops->set_callback = axis2_op_client_set_callback;
+    op_client->ops->execute = axis2_op_client_execute;
+    op_client->ops->reset = axis2_op_client_reset;
+    op_client->ops->compelete = axis2_op_client_compelete;
+    op_client->ops->get_operation_context = axis2_op_client_get_operation_context;
     op_client->ops->set_callback_recv = axis2_op_client_set_callback_recv;
-   op_client->ops->free = axis2_op_client_free;
+    op_client->ops->free = axis2_op_client_free;
 }
 
 void * AXIS2_THREAD_FUNC
@@ -616,14 +618,14 @@
     axis2_op_client_worker_func_args_t *args_list = NULL;
     axis2_op_ctx_t *op_ctx = NULL;
     axis2_msg_ctx_t *response = NULL;
-   const axis2_env_t *th_env = NULL;
-    
+    const axis2_env_t *th_env = NULL;
+
     args_list = (axis2_op_client_worker_func_args_t *) data;
     if (!args_list)
         return NULL;
-        
+
     AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
-   th_env = axis2_init_thread_env(args_list->env);
+    th_env = axis2_init_thread_env(args_list->env);
 
     op_ctx = axis2_op_ctx_create(th_env, args_list->op, args_list->op_client_impl->svc_ctx);
     if (!op_ctx)
@@ -636,16 +638,16 @@
     args_list->op_client_impl->async_result = axis2_async_result_create(th_env, response);
     AXIS2_CALLBACK_INVOKE_ON_COMPLETE(args_list->callback, th_env, args_list->op_client_impl->async_result);
     AXIS2_CALLBACK_SET_COMPLETE(args_list->callback, th_env, AXIS2_TRUE);
-    
-    return NULL; 
+
+    return NULL;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_op_client_set_callback_recv(struct axis2_op_client *op_client, 
-    const axis2_env_t *env,
-    axis2_callback_recv_t *callback_recv)
+axis2_op_client_set_callback_recv(struct axis2_op_client *op_client,
+        const axis2_env_t *env,
+        axis2_callback_recv_t *callback_recv)
 {
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_INTF_TO_IMPL(op_client)->callback_recv = callback_recv;
-   return AXIS2_SUCCESS;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(op_client)->callback_recv = callback_recv;
+    return AXIS2_SUCCESS;
 }



---------------------------------------------------------------------
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