You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/09/28 11:53:04 UTC

svn commit: r580276 [2/26] - in /webservices/axis2/trunk/c/src: core/addr/ core/clientapi/ core/context/ core/deployment/ core/description/ core/engine/ core/phaseresolver/ core/receivers/ core/transport/ core/transport/http/common/ core/transport/http...

Modified: webservices/axis2/trunk/c/src/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/clientapi/op_client.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/src/core/clientapi/op_client.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -47,17 +48,19 @@
 
     /** message exchange pattern */
     axis2_char_t *mep;
+
     /** SOAP version URI */
     axis2_char_t *soap_version_uri;
+
     /** SOAP action */
     axutil_string_t *soap_action;
+
     /** WSA action  */
     axis2_char_t *wsa_action;
     axis2_bool_t reuse;
 
 };
 
-
 typedef struct axis2_op_client_worker_func_args
 {
     const axutil_env_t *env;
@@ -65,22 +68,22 @@
     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(
-    axutil_thread_t *thd,
+void *AXIS2_THREAD_FUNC axis2_op_client_worker_func(
+    axutil_thread_t * thd,
     void *data);
 
-static axis2_char_t *AXIS2_CALL
-axis2_get_transport_from_url(
-    const axis2_char_t *url,
-    const axutil_env_t *env);
+static axis2_char_t *AXIS2_CALL axis2_get_transport_from_url(
+    const axis2_char_t * url,
+    const axutil_env_t * env);
 
 AXIS2_EXTERN axis2_op_client_t *AXIS2_CALL
-axis2_op_client_create(const axutil_env_t *env, axis2_op_t *op,
-    axis2_svc_ctx_t *svc_ctx,
-    axis2_options_t *options)
+axis2_op_client_create(
+    const axutil_env_t * env,
+    axis2_op_t * op,
+    axis2_svc_ctx_t * svc_ctx,
+    axis2_options_t * options)
 {
     axis2_op_client_t *op_client = NULL;
     const axis2_char_t *mep_uri = NULL;
@@ -91,7 +94,7 @@
     AXIS2_PARAM_CHECK(env->error, options, NULL);
 
     op_client = AXIS2_MALLOC(env->allocator, sizeof(axis2_op_client_t));
-    if(!op_client)
+    if (!op_client)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -115,9 +118,8 @@
     op_client->soap_action = NULL;
     op_client->wsa_action = NULL;
 
-    op_client->op_ctx = axis2_op_ctx_create(env, op,
-        op_client->svc_ctx);
-    if(!(op_client->op_ctx))
+    op_client->op_ctx = axis2_op_ctx_create(env, op, op_client->svc_ctx);
+    if (!(op_client->op_ctx))
     {
         axis2_op_client_free(op_client, env);
         return NULL;
@@ -125,7 +127,7 @@
 
     mep_uri = axis2_op_get_msg_exchange_pattern(op, env);
 
-    if(!mep_uri)
+    if (!mep_uri)
     {
         axis2_op_client_free(op_client, env);
         return NULL;
@@ -135,7 +137,8 @@
         op_client->mep = axutil_strdup(env, mep_uri);
     }
 
-    op_client->soap_version_uri = axutil_strdup(env, AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
+    op_client->soap_version_uri =
+        axutil_strdup(env, AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
     if (!(op_client->soap_version_uri))
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -148,26 +151,27 @@
     return op_client;
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_options(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    const axis2_options_t *options)
+axis2_op_client_set_options(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    const axis2_options_t * options)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(op_client->options)
+    if (op_client->options)
     {
         axis2_options_free(op_client->options, env);
     }
-    op_client->options = (axis2_options_t *)options;
+    op_client->options = (axis2_options_t *) options;
 
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN const axis2_options_t *AXIS2_CALL
-axis2_op_client_get_options(const axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_get_options(
+    const axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -175,31 +179,33 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_add_msg_ctx(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_msg_ctx_t *mc)
+axis2_op_client_add_msg_ctx(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * mc)
 {
-    axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
+    axis2_msg_ctx_t *out_msg_ctx = NULL,
+        *in_msg_ctx = NULL;
     axis2_msg_ctx_t **msg_ctx_map = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_ctx_map =  axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env);
+    msg_ctx_map = axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env);
 
     out_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT];
     in_msg_ctx = msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_IN];
 
-    if(op_client->reuse)
+    if (op_client->reuse)
     {
         /* This is the second invocation using the same service clinet,
            so reset */
-        if(out_msg_ctx)
+        if (out_msg_ctx)
         {
             axis2_msg_ctx_free(out_msg_ctx, env);
             out_msg_ctx = NULL;
             msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT] = NULL;
         }
-        if(in_msg_ctx)
+        if (in_msg_ctx)
         {
             axis2_msg_ctx_free(in_msg_ctx, env);
             in_msg_ctx = NULL;
@@ -209,7 +215,7 @@
         op_client->reuse = AXIS2_FALSE;
     }
 
-    if(out_msg_ctx && in_msg_ctx)
+    if (out_msg_ctx && in_msg_ctx)
     {
         /* may be this is the second invocation using the same service clinet,
            so reset */
@@ -222,7 +228,7 @@
         axis2_op_ctx_set_complete(op_client->op_ctx, env, AXIS2_FALSE);
     }
 
-    if(!out_msg_ctx)
+    if (!out_msg_ctx)
     {
         msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT] = mc;
     }
@@ -232,22 +238,23 @@
         axis2_op_ctx_set_complete(op_client->op_ctx, env, AXIS2_TRUE);
     }
 
-    if(out_msg_ctx && !mc)
+    if (out_msg_ctx && !mc)
     {
         axutil_property_t *dump_property;
         axis2_char_t *dump_value = NULL;
-        if(! axis2_msg_ctx_get_doing_rest(out_msg_ctx, env))
+        if (!axis2_msg_ctx_get_doing_rest(out_msg_ctx, env))
         {
-            dump_property =  axis2_msg_ctx_get_property(out_msg_ctx, env,
-                AXIS2_DUMP_INPUT_MSG_TRUE);
-            if(dump_property)
+            dump_property = axis2_msg_ctx_get_property(out_msg_ctx, env,
+                                                       AXIS2_DUMP_INPUT_MSG_TRUE);
+            if (dump_property)
             {
-                dump_value = (axis2_char_t *) axutil_property_get_value (
-                    dump_property, env);
+                dump_value =
+                    (axis2_char_t *) axutil_property_get_value(dump_property,
+                                                               env);
             }
         }
-		
-        if(axutil_strcmp(dump_value, AXIS2_VALUE_TRUE))
+
+        if (axutil_strcmp(dump_value, AXIS2_VALUE_TRUE))
         {
             axis2_msg_ctx_free(out_msg_ctx, env);
             out_msg_ctx = NULL;
@@ -258,39 +265,40 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_add_out_msg_ctx(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_msg_ctx_t *mc)
+axis2_op_client_add_out_msg_ctx(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * mc)
 {
     axis2_msg_ctx_t **msg_ctx_map = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_ctx_map =  axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env);
+    msg_ctx_map = axis2_op_ctx_get_msg_ctx_map(op_client->op_ctx, env);
 
     msg_ctx_map[AXIS2_WSDL_MESSAGE_LABEL_OUT] = mc;
 
     return AXIS2_SUCCESS;
 }
 
-
-
 AXIS2_EXTERN const axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_get_msg_ctx(const axis2_op_client_t *op_client,
-    const axutil_env_t *env,
+axis2_op_client_get_msg_ctx(
+    const axis2_op_client_t * op_client,
+    const axutil_env_t * env,
     const axis2_wsdl_msg_labels_t message_label)
 {
-    return  axis2_op_ctx_get_msg_ctx(op_client->op_ctx, env, message_label);
+    return axis2_op_ctx_get_msg_ctx(op_client->op_ctx, env, message_label);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_callback(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_callback_t *callback)
+axis2_op_client_set_callback(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_callback_t * callback)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(op_client->callback)
+    if (op_client->callback)
     {
         axis2_callback_free(op_client->callback, env);
     }
@@ -300,16 +308,17 @@
 }
 
 AXIS2_EXTERN axis2_callback_t *AXIS2_CALL
-axis2_op_client_get_callback(axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_get_callback(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     return op_client->callback;
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_execute(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
+axis2_op_client_execute(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
     const axis2_bool_t block)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
@@ -324,17 +333,17 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(op_client->completed)
+    if (op_client->completed)
     {
         return AXIS2_FAILURE;
     }
 
-    conf_ctx =  axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
+    conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
 
-    msg_ctx = (axis2_msg_ctx_t *)axis2_op_client_get_msg_ctx(op_client, env,
-        AXIS2_WSDL_MESSAGE_LABEL_OUT);
+    msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx(op_client, env,
+                                                              AXIS2_WSDL_MESSAGE_LABEL_OUT);
 
-    if(!msg_ctx)
+    if (!msg_ctx)
     {
         return AXIS2_FAILURE;
     }
@@ -345,97 +354,100 @@
        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->options,
-        env);
-    if(!transport_out)
+    transport_out = axis2_options_get_transport_out(op_client->options, env);
+    if (!transport_out)
     {
         axis2_endpoint_ref_t *to_epr = NULL;
         axutil_property_t *property = NULL;
-        property = axis2_options_get_property(op_client->options, env, 
-            AXIS2_TARGET_EPR);
-        if(property)
+        property = axis2_options_get_property(op_client->options, env,
+                                              AXIS2_TARGET_EPR);
+        if (property)
         {
             to_epr = axutil_property_get_value(property, env);
         }
 
-        if(!to_epr)
+        if (!to_epr)
         {
             to_epr = axis2_options_get_to(op_client->options, env);
         }
 
-        if(!to_epr)
+        if (!to_epr)
         {
-            to_epr =  axis2_msg_ctx_get_to(msg_ctx, env);
+            to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
         }
 
         transport_out = axis2_op_client_infer_transport(op_client, env, to_epr);
     }
 
-    if(!transport_out)
+    if (!transport_out)
     {
         return AXIS2_FAILURE;
     }
 
-    if(!(axis2_msg_ctx_get_transport_out_desc(msg_ctx, env)))
+    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->options, env);
-    if(!transport_in)
+    if (!transport_in)
     {
-        axis2_conf_ctx_t *conf_ctx =  axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
+        axis2_conf_ctx_t *conf_ctx =
+            axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
 
-        if(conf_ctx)
+        if (conf_ctx)
         {
-            axis2_conf_t *conf =  axis2_conf_ctx_get_conf(conf_ctx, env);
-            if(conf)
+            axis2_conf_t *conf = axis2_conf_ctx_get_conf(conf_ctx, env);
+            if (conf)
             {
-                transport_in =  axis2_conf_get_transport_in(conf, env,
-                    axis2_transport_out_desc_get_enum(transport_out, env));
+                transport_in = axis2_conf_get_transport_in(conf, env,
+                                                           axis2_transport_out_desc_get_enum
+                                                           (transport_out,
+                                                            env));
             }
         }
     }
 
-    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->op_ctx, env);
+    op = axis2_op_ctx_get_op(op_client->op_ctx, env);
 
-    if(!op)
+    if (!op)
     {
         return AXIS2_FAILURE;
     }
     status = axis2_op_client_prepare_invocation(op_client, env, op, msg_ctx);
-    if(status != AXIS2_SUCCESS)
+    if (status != AXIS2_SUCCESS)
     {
         return AXIS2_FAILURE;
     }
-    msg_id = (axis2_char_t*)axutil_uuid_gen(env);
+    msg_id = (axis2_char_t *) axutil_uuid_gen(env);
     axis2_msg_ctx_set_message_id(msg_ctx, env, msg_id);
-    if(msg_id)
+    if (msg_id)
     {
         AXIS2_FREE(env->allocator, msg_id);
         msg_id = NULL;
     }
 
-    if(axis2_options_get_use_separate_listener(op_client->options, env))
+    if (axis2_options_get_use_separate_listener(op_client->options, env))
     {
         axis2_engine_t *engine = NULL;
 
         AXIS2_CALLBACK_RECV_ADD_CALLBACK(op_client->callback_recv, env,
-            axis2_msg_ctx_get_msg_id(msg_ctx, env),
-            op_client->callback);
+                                         axis2_msg_ctx_get_msg_id(msg_ctx, env),
+                                         op_client->callback);
         axis2_msg_ctx_set_op_ctx(msg_ctx, env, axis2_op_find_op_ctx(op, env,
-            msg_ctx, op_client->svc_ctx));
+                                                                    msg_ctx,
+                                                                    op_client->
+                                                                    svc_ctx));
         axis2_msg_ctx_set_svc_ctx(msg_ctx, env, op_client->svc_ctx);
 
         /* send the message */
         engine = axis2_engine_create(env, conf_ctx);
-        if(!engine)
+        if (!engine)
         {
             return AXIS2_FAILURE;
         }
@@ -444,25 +456,27 @@
     }
     else
     {
-        if(block)
+        if (block)
         {
             axis2_msg_ctx_t *response_mc = NULL;
-            
+
             axis2_msg_ctx_set_svc_ctx(msg_ctx, env, op_client->svc_ctx);
             axis2_msg_ctx_set_conf_ctx(msg_ctx, env,
-                axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env));
+                                       axis2_svc_ctx_get_conf_ctx(op_client->
+                                                                  svc_ctx,
+                                                                  env));
             axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_client->op_ctx);
 
-
             /*Send the SOAP Message and receive a response */
             response_mc = axis2_op_client_two_way_send(env, msg_ctx);
-            if(!response_mc)
+            if (!response_mc)
             {
-                const axis2_char_t *mep = axis2_op_get_msg_exchange_pattern(op, env);
-                if(!(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY)) ||
-                   !(axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY)))
+                const axis2_char_t *mep =
+                    axis2_op_get_msg_exchange_pattern(op, env);
+                if (!(axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY)) ||
+                    !(axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY)))
                 {
-                    if(env->error)
+                    if (env->error)
                     {
                         return env->error->status_code;
                     }
@@ -476,16 +490,15 @@
                     return AXIS2_FAILURE;
                 }
             }
-            axis2_op_client_add_msg_ctx(op_client, env,
-                response_mc);
+            axis2_op_client_add_msg_ctx(op_client, env, response_mc);
         }
         else
         {
             axutil_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(! arg_list)
+                                    sizeof(axis2_op_client_worker_func_args_t));
+            if (!arg_list)
             {
                 return AXIS2_FAILURE;
             }
@@ -495,26 +508,28 @@
             arg_list->op = op;
             arg_list->msg_ctx = msg_ctx;
 #ifdef AXIS2_SVR_MULTI_THREADED
-            if(env->thread_pool)
+            if (env->thread_pool)
             {
                 worker_thread = axutil_thread_pool_get_thread(env->thread_pool,
-                    axis2_op_client_worker_func, (void*)arg_list);
-                if(! worker_thread)
+                                                              axis2_op_client_worker_func,
+                                                              (void *)
+                                                              arg_list);
+                if (!worker_thread)
                 {
-                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                        "Thread creation failed call invoke non blocking");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                                    "Thread creation failed call invoke non blocking");
                 }
-                axutil_thread_pool_thread_detach(env->thread_pool, 
-                    worker_thread);
+                axutil_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");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                                "Thread pool not set in environment"
+                                "Cannot invoke call non blocking");
             }
 #else
-            axis2_op_client_worker_func(NULL, (void*)arg_list);
+            axis2_op_client_worker_func(NULL, (void *) arg_list);
 #endif
 
         }
@@ -523,12 +538,13 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_reset(axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_reset(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(!op_client->completed)
+    if (!op_client->completed)
         return AXIS2_FAILURE;
 
     op_client->completed = AXIS2_FALSE;
@@ -539,8 +555,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_complete(axis2_op_client_t *op_client,
-    const axutil_env_t *env, axis2_msg_ctx_t *mc)
+axis2_op_client_complete(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * mc)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
@@ -548,41 +566,43 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    conf_ctx =  axis2_msg_ctx_get_conf_ctx(mc, env);
+    conf_ctx = axis2_msg_ctx_get_conf_ctx(mc, env);
 
-    if(!conf_ctx)
+    if (!conf_ctx)
         return AXIS2_FAILURE;
 
-    if(!listener_manager)
+    if (!listener_manager)
         return AXIS2_FAILURE;
 
     return axis2_listener_manager_stop(listener_manager, env, transport);
 }
 
 AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
-axis2_op_client_get_operation_context(const axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_get_operation_context(
+    const axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     return op_client->op_ctx;
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axis2_op_client_free(axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_free(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, void);
 
-    if(op_client->callback)
+    if (op_client->callback)
     {
         axis2_callback_free(op_client->callback, env);
     }
 
-    if(op_client->op_ctx)
+    if (op_client->op_ctx)
     {
         axis2_op_ctx_free(op_client->op_ctx, env);
         op_client->op_ctx = NULL;
     }
-    
+
     if (op_client->soap_version_uri)
     {
         AXIS2_FREE(env->allocator, op_client->soap_version_uri);
@@ -593,19 +613,19 @@
         AXIS2_FREE(env->allocator, op_client->mep);
     }
 
-	if(axis2_options_get_xml_parser_reset(op_client->options, env))
-	{
-        axiom_xml_reader_cleanup(); 
-	}
+    if (axis2_options_get_xml_parser_reset(op_client->options, env))
+    {
+        axiom_xml_reader_cleanup();
+    }
 
     AXIS2_FREE(env->allocator, op_client);
 
     return;
 }
 
-
 void *AXIS2_THREAD_FUNC
-axis2_op_client_worker_func(axutil_thread_t *thd,
+axis2_op_client_worker_func(
+    axutil_thread_t * thd,
     void *data)
 {
     axis2_op_client_worker_func_args_t *args_list = NULL;
@@ -615,7 +635,7 @@
     axutil_thread_pool_t *th_pool = NULL;
 
     args_list = (axis2_op_client_worker_func_args_t *) data;
-    if(!args_list)
+    if (!args_list)
     {
         return NULL;
     }
@@ -623,39 +643,41 @@
     AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
     th_env = axutil_init_thread_env(args_list->env);
 
-    op_ctx = axis2_op_ctx_create(th_env, args_list->op, 
-                args_list->op_client->svc_ctx);
-    if(!op_ctx)
+    op_ctx = axis2_op_ctx_create(th_env, args_list->op,
+                                 args_list->op_client->svc_ctx);
+    if (!op_ctx)
     {
         return NULL;
     }
     axis2_msg_ctx_set_op_ctx(args_list->msg_ctx, th_env, op_ctx);
-    axis2_msg_ctx_set_svc_ctx(args_list->msg_ctx, th_env, args_list->op_client->svc_ctx);
+    axis2_msg_ctx_set_svc_ctx(args_list->msg_ctx, th_env,
+                              args_list->op_client->svc_ctx);
 
     /* send the request and wait for response */
     response = axis2_op_client_two_way_send(th_env, args_list->msg_ctx);
 
     axis2_op_client_add_msg_ctx(args_list->op_client, th_env, response);
-    args_list->op_client->async_result = axis2_async_result_create(th_env, 
-        response);
-    
+    args_list->op_client->async_result = axis2_async_result_create(th_env,
+                                                                   response);
+
     if (args_list->callback)
     {
-        axis2_callback_invoke_on_complete(args_list->callback, 
-            th_env, args_list->op_client->async_result);
+        axis2_callback_invoke_on_complete(args_list->callback,
+                                          th_env,
+                                          args_list->op_client->async_result);
         axis2_callback_set_complete(args_list->callback, th_env, AXIS2_TRUE);
     }
 
     /* clean up memory */
     axis2_async_result_free(args_list->op_client->async_result, th_env);
-    
+
     axis2_op_ctx_free(op_ctx, th_env);
-        
+
     th_pool = th_env->thread_pool;
-    
+
     AXIS2_FREE(th_env->allocator, args_list);
-    
-    if(th_env)
+
+    if (th_env)
     {
         axutil_free_thread_env(th_env);
         th_env = NULL;
@@ -665,28 +687,29 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_callback_recv(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_callback_recv_t *callback_recv)
+axis2_op_client_set_callback_recv(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_callback_recv_t * callback_recv)
 {
     op_client->callback_recv = callback_recv;
     return AXIS2_SUCCESS;
 }
 
-
 AXIS2_EXTERN axutil_string_t *AXIS2_CALL
 axis2_op_client_get_soap_action(
-    const axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+    const axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     return op_client->soap_action;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_prepare_invocation(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_op_t *op,
-    axis2_msg_ctx_t *msg_ctx)
+axis2_op_client_prepare_invocation(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_op_t * op,
+    axis2_msg_ctx_t * msg_ctx)
 {
     axis2_svc_t *svc = NULL;
 
@@ -697,18 +720,19 @@
     /* make sure operation's MEP is the same as given MEP */
     if (op_client->mep)
     {
-        if (axutil_strcmp(op_client->mep, 
-                axis2_op_get_msg_exchange_pattern(op, env)))
+        if (axutil_strcmp(op_client->mep,
+                          axis2_op_get_msg_exchange_pattern(op, env)))
         {
-            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT,                 
-                AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_MISMATCH_IN_MEP_CLIENT,
+                            AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
     else
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT,           
-                AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error,
+                        AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT,
+                        AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     /* If operation has a parent service get it */
@@ -719,7 +743,7 @@
     }
     else
     {
-        svc =  axis2_svc_ctx_get_svc(op_client->svc_ctx, env);
+        svc = axis2_svc_ctx_get_svc(op_client->svc_ctx, env);
         if (svc)
         {
             axis2_op_t *temp_op = NULL;
@@ -746,9 +770,10 @@
 }
 
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_prepare_soap_envelope(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axiom_node_t *to_send)
+axis2_op_client_prepare_soap_envelope(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axiom_node_t * to_send)
 {
     axis2_msg_ctx_t *msg_ctx = NULL;
     axiom_soap_envelope_t *envelope = NULL;
@@ -759,8 +784,9 @@
     if (op_client->svc_ctx)
     {
         msg_ctx = axis2_msg_ctx_create(env,
-            axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env),
-            NULL, NULL);
+                                       axis2_svc_ctx_get_conf_ctx(op_client->
+                                                                  svc_ctx, env),
+                                       NULL, NULL);
     }
 
     if (!msg_ctx)
@@ -771,14 +797,14 @@
     if (op_client->soap_version_uri)
     {
         if (!(axutil_strcmp(op_client->soap_version_uri,
-                  AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI)))
+                            AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI)))
             soap_version = AXIOM_SOAP11;
         else
             soap_version = AXIOM_SOAP12;
     }
 
-    envelope = axiom_soap_envelope_create_default_soap_envelope(env, 
-                   soap_version);
+    envelope = axiom_soap_envelope_create_default_soap_envelope(env,
+                                                                soap_version);
     if (!envelope)
     {
         return NULL;
@@ -805,17 +831,18 @@
 }
 
 AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
-axis2_op_client_infer_transport(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *epr)
+axis2_op_client_infer_transport(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * epr)
 {
     axis2_char_t *transport = NULL;
     axis2_transport_out_desc_t *transport_out_desc = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-        "Start:axis2_op_client_infer_transport");
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+                    "Start:axis2_op_client_infer_transport");
     if (epr)
     {
         const axis2_char_t *to_url = axis2_endpoint_ref_get_address(epr, env);
@@ -827,34 +854,34 @@
     {
         axis2_conf_ctx_t *conf_ctx = NULL;
         axis2_conf_t *conf = NULL;
-		AXIS2_TRANSPORT_ENUMS transport_enum = 0;
-        
+        AXIS2_TRANSPORT_ENUMS transport_enum = 0;
+
         if (!axutil_strcmp(transport, "http"))
-		{
+        {
             transport_enum = AXIS2_TRANSPORT_ENUM_HTTP;
-		}
-        else if (!axutil_strcmp (transport, "https"))
-		{
+        }
+        else if (!axutil_strcmp(transport, "https"))
+        {
             transport_enum = AXIS2_TRANSPORT_ENUM_HTTPS;
-		}
-        else if (!axutil_strcmp (transport, "xmpp"))
+        }
+        else if (!axutil_strcmp(transport, "xmpp"))
         {
             transport_enum = AXIS2_TRANSPORT_ENUM_XMPP;
         }
-        else if (!axutil_strcmp (transport, "tcp"))
+        else if (!axutil_strcmp(transport, "tcp"))
         {
             transport_enum = AXIS2_TRANSPORT_ENUM_TCP;
         }
 
-
-        conf_ctx =  axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
+        conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
         if (conf_ctx)
         {
-            conf =  axis2_conf_ctx_get_conf(conf_ctx, env);
+            conf = axis2_conf_ctx_get_conf(conf_ctx, env);
             if (conf)
             {
-                transport_out_desc =  axis2_conf_get_transport_out(conf, 
-                                          env, transport_enum);
+                transport_out_desc = axis2_conf_get_transport_out(conf,
+                                                                  env,
+                                                                  transport_enum);
             }
         }
 
@@ -862,47 +889,50 @@
         transport = NULL;
 
     }
-    if(!transport_out_desc)
+    if (!transport_out_desc)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[axis2c] Cannot infer transport");
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CANNOT_INFER_TRANSPORT, 
-            AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "[axis2c] Cannot infer transport");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CANNOT_INFER_TRANSPORT,
+                        AXIS2_FAILURE);
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-        "End:axis2_op_client_infer_transport");
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+                    "End:axis2_op_client_infer_transport");
     return transport_out_desc;
 }
 
 AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
-axis2_op_client_create_default_soap_envelope(axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_create_default_soap_envelope(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     axiom_soap_envelope_t *envelope = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    if (!(axutil_strcmp(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, 
-              op_client->soap_version_uri)))
+    if (!(axutil_strcmp(AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI,
+                        op_client->soap_version_uri)))
     {
-        envelope = axiom_soap_envelope_create_with_soap_version_prefix(env, 
-                       AXIOM_SOAP12, NULL);
+        envelope = axiom_soap_envelope_create_with_soap_version_prefix(env,
+                                                                       AXIOM_SOAP12,
+                                                                       NULL);
     }
-        
-    if (!(axutil_strcmp(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI, 
-             op_client->soap_version_uri)))
+
+    if (!(axutil_strcmp(AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI,
+                        op_client->soap_version_uri)))
     {
-        envelope = axiom_soap_envelope_create_with_soap_version_prefix(env, 
-                       AXIOM_SOAP11, NULL);
+        envelope = axiom_soap_envelope_create_with_soap_version_prefix(env,
+                                                                       AXIOM_SOAP11,
+                                                                       NULL);
     }
     return envelope;
 }
-        
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_engage_module(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    const axutil_qname_t *qname)
+axis2_op_client_engage_module(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    const axutil_qname_t * qname)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_conf_t *conf = NULL;
@@ -911,16 +941,16 @@
 
     if (op_client->svc_ctx)
     {
-        conf_ctx =  axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
+        conf_ctx = axis2_svc_ctx_get_conf_ctx(op_client->svc_ctx, env);
         if (conf_ctx)
         {
-            conf =  axis2_conf_ctx_get_conf(conf_ctx, env);
+            conf = axis2_conf_ctx_get_conf(conf_ctx, env);
             if (conf)
             {
-                /*if it is already engaged do not engage it again*/
-                if (!( axis2_conf_is_engaged(conf, env, qname)))
+                /*if it is already engaged do not engage it again */
+                if (!(axis2_conf_is_engaged(conf, env, qname)))
                 {
-                    return  axis2_conf_engage_module(conf, env, qname);
+                    return axis2_conf_engage_module(conf, env, qname);
                 }
             }
         }
@@ -930,9 +960,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_soap_version_uri(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    const axis2_char_t *soap_version_uri)
+axis2_op_client_set_soap_version_uri(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    const axis2_char_t * soap_version_uri)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -956,9 +987,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_soap_action(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    axutil_string_t *soap_action)
+axis2_op_client_set_soap_action(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    axutil_string_t * soap_action)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -982,9 +1014,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_client_set_wsa_action(axis2_op_client_t *op_client,
-    const axutil_env_t *env,
-    const axis2_char_t *wsa_action)
+axis2_op_client_set_wsa_action(
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
+    const axis2_char_t * wsa_action)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -1008,8 +1041,9 @@
 }
 
 static axis2_char_t *AXIS2_CALL
-axis2_get_transport_from_url(const axis2_char_t *url,
-    const axutil_env_t *env)
+axis2_get_transport_from_url(
+    const axis2_char_t * url,
+    const axutil_env_t * env)
 {
     axis2_char_t *transport = NULL;
     const axis2_char_t *start = NULL;
@@ -1023,7 +1057,8 @@
     if ((*end) == ':')
     {
         const axis2_char_t *c = NULL;
-        transport = AXIS2_MALLOC(env->allocator, (end - start + 1) * sizeof(char));
+        transport =
+            AXIS2_MALLOC(env->allocator, (end - start + 1) * sizeof(char));
         if (!transport)
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -1032,23 +1067,24 @@
 
         for (c = start; c < end; c++)
             transport[c - start] = *c;
-        transport[c-start] = '\0';
+        transport[c - start] = '\0';
     }
 
     return transport;
 }
 
 AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
-axis2_op_client_get_svc_ctx(const axis2_op_client_t *op_client,
-    const axutil_env_t *env)
+axis2_op_client_get_svc_ctx(
+    const axis2_op_client_t * op_client,
+    const axutil_env_t * env)
 {
     return op_client->svc_ctx;
 }
 
-
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_two_way_send(const axutil_env_t *env,
-    axis2_msg_ctx_t *msg_ctx)
+axis2_op_client_two_way_send(
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx)
 {
     axis2_engine_t *engine = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
@@ -1062,17 +1098,18 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    conf_ctx =  axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+    conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
     engine = axis2_engine_create(env, conf_ctx);
     if (!engine)
         return NULL;
-    property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TIMEOUT_IN_SECONDS);
-    if(property)
+    property =
+        axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TIMEOUT_IN_SECONDS);
+    if (property)
     {
         axis2_char_t *value = axutil_property_get_value(property, env);
-        if(value)
+        if (value)
             index = AXIS2_ATOI(value);
-        if(index == -1)
+        if (index == -1)
         {
             wait_indefinitely = AXIS2_TRUE;
             index = 1;
@@ -1080,13 +1117,13 @@
     }
 
     status = axis2_engine_send(engine, env, msg_ctx);
-    
+
     axis2_engine_free(engine, env);
     engine = NULL;
-    
+
     if (status != AXIS2_SUCCESS)
         return NULL;
-    op =  axis2_msg_ctx_get_op(msg_ctx, env);
+    op = axis2_msg_ctx_get_op(msg_ctx, env);
     if (op)
     {
         /* handle one way case */
@@ -1100,12 +1137,14 @@
 
     /* create the response */
     response = axis2_msg_ctx_create(env, conf_ctx,
-                   axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
-                   axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
+                                    axis2_msg_ctx_get_transport_in_desc(msg_ctx,
+                                                                        env),
+                                    axis2_msg_ctx_get_transport_out_desc
+                                    (msg_ctx, env));
     if (!response)
         return NULL;
 
-    property =  axis2_msg_ctx_get_property(msg_ctx, env,AXIS2_TRANSPORT_IN);
+    property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
     if (property)
     {
         axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
@@ -1114,49 +1153,49 @@
 
     if (op)
     {
-        axis2_op_register_op_ctx(op, 
-            env, response,  axis2_msg_ctx_get_op_ctx(msg_ctx, env));
+        axis2_op_register_op_ctx(op,
+                                 env, response,
+                                 axis2_msg_ctx_get_op_ctx(msg_ctx, env));
     }
     axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
-    axis2_msg_ctx_set_conf_ctx(response, env,  
-        axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
-    axis2_msg_ctx_set_svc_grp_ctx(response, env,  
-        axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
-
-    /* If request is REST we assume the response is REST, so set the variable*/
-    axis2_msg_ctx_set_doing_rest(response, env,  
-        axis2_msg_ctx_get_doing_rest(msg_ctx, env));
-	/* set response envelope */
+    axis2_msg_ctx_set_conf_ctx(response, env,
+                               axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
+    axis2_msg_ctx_set_svc_grp_ctx(response, env,
+                                  axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
+
+    /* If request is REST we assume the response is REST, so set the variable */
+    axis2_msg_ctx_set_doing_rest(response, env,
+                                 axis2_msg_ctx_get_doing_rest(msg_ctx, env));
+    /* set response envelope */
     if (engine)
     {
         axis2_engine_free(engine, env);
         engine = NULL;
     }
-    response_envelope =  axis2_msg_ctx_get_response_soap_envelope (msg_ctx, 
-        env);
-    if(response_envelope)
+    response_envelope = axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env);
+    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);
+            status = axis2_engine_receive(engine, env, response);
             /*
-            if (status != AXIS2_SUCCESS)
-                return NULL;
-            */
+               if (status != AXIS2_SUCCESS)
+               return NULL;
+             */
         }
     }
     else
     {
-        while(!response_envelope && index > 0)
+        while (!response_envelope && index > 0)
         {
-            /*wait till the response arrives*/
+            /*wait till the response arrives */
             AXIS2_SLEEP(1);
-            if(!wait_indefinitely)
+            if (!wait_indefinitely)
                 index--;
-            response_envelope = axis2_msg_ctx_get_response_soap_envelope(
-                msg_ctx, env);
+            response_envelope =
+                axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env);
         }
         /* if it is a two way message, then the status should be in error,
            else it is a one way message */
@@ -1167,12 +1206,12 @@
              * through the incoming phases. eg. Reliable Messaging 1.0 two
              * way single channel
              */
-            property = axis2_msg_ctx_get_property(msg_ctx, env, 
-                AXIS2_HANDLER_ALREADY_VISITED);
-            if(property)
+            property = axis2_msg_ctx_get_property(msg_ctx, env,
+                                                  AXIS2_HANDLER_ALREADY_VISITED);
+            if (property)
             {
                 axis2_char_t *value = axutil_property_get_value(property, env);
-                if(!axutil_strcmp(AXIS2_VALUE_TRUE, value))
+                if (!axutil_strcmp(AXIS2_VALUE_TRUE, value))
                 {
                     return response;
                 }
@@ -1180,7 +1219,7 @@
             engine = axis2_engine_create(env, conf_ctx);
             if (engine)
             {
-                status =  axis2_engine_receive(engine, env, response);
+                status = axis2_engine_receive(engine, env, response);
                 if (status != AXIS2_SUCCESS)
                     return NULL;
             }
@@ -1189,9 +1228,9 @@
         {
             if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
             {
-                AXIS2_ERROR_SET(env->error, 
-                    AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, 
-                    AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error,
+                                AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE,
+                                AXIS2_FAILURE);
                 if (engine)
                 {
                     axis2_engine_free(engine, env);
@@ -1216,8 +1255,9 @@
 }
 
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
-axis2_op_client_receive(const axutil_env_t *env,
-    axis2_msg_ctx_t *msg_ctx)
+axis2_op_client_receive(
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx)
 {
     axis2_engine_t *engine = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
@@ -1231,34 +1271,37 @@
 
     /* create the response */
     response = axis2_msg_ctx_create(env, conf_ctx,
-        axis2_msg_ctx_get_transport_in_desc(msg_ctx, env),
-        axis2_msg_ctx_get_transport_out_desc(msg_ctx, env));
+                                    axis2_msg_ctx_get_transport_in_desc(msg_ctx,
+                                                                        env),
+                                    axis2_msg_ctx_get_transport_out_desc
+                                    (msg_ctx, env));
     if (!response)
         return NULL;
 
-    property =  axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
+    property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_IN);
     if (property)
     {
         axis2_msg_ctx_set_property(response, env, AXIS2_TRANSPORT_IN, property);
         property = NULL;
     }
 
-    op =  axis2_msg_ctx_get_op(msg_ctx, env);
+    op = axis2_msg_ctx_get_op(msg_ctx, env);
     if (op)
     {
-        axis2_op_register_op_ctx(op, env, response,  axis2_msg_ctx_get_op_ctx(msg_ctx, env));
+        axis2_op_register_op_ctx(op, env, response,
+                                 axis2_msg_ctx_get_op_ctx(msg_ctx, env));
     }
     axis2_msg_ctx_set_server_side(response, env, AXIS2_FALSE);
-    axis2_msg_ctx_set_conf_ctx(response, env,  
-        axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
-    axis2_msg_ctx_set_svc_grp_ctx(response, env,  
-        axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
-
-    /* If request is REST we assume the response is REST, so set the variable*/
-    axis2_msg_ctx_set_doing_rest(response, env,  
-        axis2_msg_ctx_get_doing_rest(msg_ctx, env));
+    axis2_msg_ctx_set_conf_ctx(response, env,
+                               axis2_msg_ctx_get_conf_ctx(msg_ctx, env));
+    axis2_msg_ctx_set_svc_grp_ctx(response, env,
+                                  axis2_msg_ctx_get_svc_grp_ctx(msg_ctx, env));
+
+    /* If request is REST we assume the response is REST, so set the variable */
+    axis2_msg_ctx_set_doing_rest(response, env,
+                                 axis2_msg_ctx_get_doing_rest(msg_ctx, env));
 
- 	response_envelope =  axis2_msg_ctx_get_response_soap_envelope (msg_ctx, env);
+    response_envelope = axis2_msg_ctx_get_response_soap_envelope(msg_ctx, env);
     if (response_envelope)
     {
         axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
@@ -1271,7 +1314,7 @@
         engine = axis2_engine_create(env, conf_ctx);
         if (engine)
         {
-            status =  axis2_engine_receive(engine, env, response);
+            status = axis2_engine_receive(engine, env, response);
             if (status != AXIS2_SUCCESS)
             {
                 return NULL;
@@ -1285,9 +1328,9 @@
            else it is a one way message */
         if (AXIS2_ERROR_GET_STATUS_CODE(env->error) != AXIS2_SUCCESS)
         {
-            AXIS2_ERROR_SET(env->error, 
-                AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE, 
-                AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error,
+                            AXIS2_ERROR_BLOCKING_INVOCATION_EXPECTS_RESPONSE,
+                            AXIS2_FAILURE);
             return NULL;
         }
     }
@@ -1304,13 +1347,11 @@
     return response;
 }
 
-
 AXIS2_EXTERN void AXIS2_CALL
 axis2_op_client_set_reuse(
-    axis2_op_client_t *op_client,
-    const axutil_env_t *env,
+    axis2_op_client_t * op_client,
+    const axutil_env_t * env,
     axis2_bool_t reuse)
 {
     op_client->reuse = reuse;
 }
-

Modified: webservices/axis2/trunk/c/src/core/clientapi/options.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/clientapi/options.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/clientapi/options.c (original)
+++ webservices/axis2/trunk/c/src/core/clientapi/options.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,7 +16,6 @@
  * limitations under the License.
  */
 
-
 #include <axis2_options.h>
 #include <axis2_const.h>
 #include <axutil_hash.h>
@@ -26,6 +26,7 @@
 
 struct axis2_options
 {
+
     /** parent options */
     axis2_options_t *parent;
 
@@ -59,7 +60,8 @@
 };
 
 AXIS2_EXTERN axis2_options_t *AXIS2_CALL
-axis2_options_create(const axutil_env_t *env)
+axis2_options_create(
+    const axutil_env_t * env)
 {
     axis2_options_t *options = NULL;
 
@@ -88,7 +90,6 @@
     options->soap_action = NULL;
     options->xml_parser_reset = AXIS2_TRUE;
 
-
     options->msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
     if (!(options->msg_info_headers))
     {
@@ -107,8 +108,9 @@
 }
 
 AXIS2_EXTERN axis2_options_t *AXIS2_CALL
-axis2_options_create_with_parent(const axutil_env_t *env,
-    axis2_options_t *parent)
+axis2_options_create_with_parent(
+    const axutil_env_t * env,
+    axis2_options_t * parent)
 {
 
     axis2_options_t *options = NULL;
@@ -123,8 +125,9 @@
 }
 
 AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-axis2_options_get_action(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_action(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     const axis2_char_t *action = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -140,13 +143,15 @@
 }
 
 AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_fault_to(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_fault_to(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     axis2_endpoint_ref_t *fault_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    fault_to = axis2_msg_info_headers_get_fault_to(options->msg_info_headers, env);
+    fault_to =
+        axis2_msg_info_headers_get_fault_to(options->msg_info_headers, env);
 
     if (fault_to == NULL && options->parent)
     {
@@ -156,10 +161,10 @@
     return fault_to;
 }
 
-
 AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_from(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_from(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     axis2_endpoint_ref_t *from = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -175,8 +180,9 @@
 }
 
 AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
-axis2_options_get_transport_receiver(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_transport_receiver(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -189,8 +195,9 @@
 }
 
 AXIS2_EXTERN axis2_transport_in_desc_t *AXIS2_CALL
-axis2_options_get_transport_in(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_transport_in(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -203,8 +210,9 @@
 }
 
 AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
-axis2_options_get_transport_in_protocol(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_transport_in_protocol(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -217,13 +225,15 @@
 }
 
 AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-axis2_options_get_message_id(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_message_id(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     const axis2_char_t *message_id = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    message_id = axis2_msg_info_headers_get_message_id(options->msg_info_headers, env);
+    message_id =
+        axis2_msg_info_headers_get_message_id(options->msg_info_headers, env);
 
     if (message_id == NULL && options->parent)
     {
@@ -234,8 +244,9 @@
 }
 
 AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
-axis2_options_get_properties(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_properties(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -248,9 +259,10 @@
 }
 
 AXIS2_EXTERN void *AXIS2_CALL
-axis2_options_get_property(const axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *key)
+axis2_options_get_property(
+    const axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * key)
 {
     void *property = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -266,13 +278,15 @@
 }
 
 AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
-axis2_options_get_relates_to(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_relates_to(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     axis2_relates_to_t *relates_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    relates_to = axis2_msg_info_headers_get_relates_to(options->msg_info_headers, env);
+    relates_to =
+        axis2_msg_info_headers_get_relates_to(options->msg_info_headers, env);
 
     if (relates_to == NULL && options->parent)
     {
@@ -283,13 +297,15 @@
 }
 
 AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_reply_to(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_reply_to(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     axis2_endpoint_ref_t *reply_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    reply_to = axis2_msg_info_headers_get_reply_to(options->msg_info_headers, env);
+    reply_to =
+        axis2_msg_info_headers_get_reply_to(options->msg_info_headers, env);
 
     if (reply_to == NULL && options->parent)
     {
@@ -300,8 +316,9 @@
 }
 
 AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
-axis2_options_get_transport_out(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_transport_out(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -314,23 +331,26 @@
 }
 
 AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
-axis2_options_get_sender_transport_protocol(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_sender_transport_protocol(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
 
     AXIS2_ENV_CHECK(env, NULL);
 
     if (options->parent)
     {
-        return axis2_options_get_sender_transport_protocol(options->parent, env);
+        return axis2_options_get_sender_transport_protocol(options->parent,
+                                                           env);
     }
 
     return options->sender_transport_protocol;
 }
 
 AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-axis2_options_get_soap_version_uri(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_soap_version_uri(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -348,8 +368,9 @@
 }
 
 AXIS2_EXTERN long AXIS2_CALL
-axis2_options_get_timeout_in_milli_seconds(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_timeout_in_milli_seconds(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     if (options->timeout_in_milli_seconds == -1 && options->parent)
     {
@@ -364,10 +385,10 @@
     return options->timeout_in_milli_seconds;
 }
 
-
-AXIS2_EXTERN axis2_endpoint_ref_t* AXIS2_CALL
-axis2_options_get_to(const axis2_options_t *options,
-    const axutil_env_t *env)
+AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
+axis2_options_get_to(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     axis2_endpoint_ref_t *to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -382,10 +403,10 @@
     return to;
 }
 
-
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_options_get_use_separate_listener(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_use_separate_listener(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     if (options->use_separate_listener == -1 && options->parent)
     {
@@ -401,78 +422,88 @@
 }
 
 AXIS2_EXTERN axis2_options_t *AXIS2_CALL
-axis2_options_get_parent(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_parent(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     return options->parent;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_parent(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_options_t *parent)
+axis2_options_set_parent(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_options_t * parent)
 {
-    options->parent = (axis2_options_t *)parent;
+    options->parent = (axis2_options_t *) parent;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_action(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *action)
+axis2_options_set_action(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * action)
 {
     axis2_msg_info_headers_set_action(options->msg_info_headers, env, action);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_fault_to(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *fault_to)
+axis2_options_set_fault_to(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * fault_to)
 {
-    axis2_msg_info_headers_set_fault_to(options->msg_info_headers, env, fault_to);
+    axis2_msg_info_headers_set_fault_to(options->msg_info_headers, env,
+                                        fault_to);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_from(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *from)
+axis2_options_set_from(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * from)
 {
     axis2_msg_info_headers_set_from(options->msg_info_headers, env, from);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_to(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *to)
+axis2_options_set_to(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * to)
 {
     axis2_msg_info_headers_set_to(options->msg_info_headers, env, to);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_transport_receiver(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_transport_receiver_t *receiver)
+axis2_options_set_transport_receiver(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_transport_receiver_t * receiver)
 {
     options->receiver = receiver;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_transport_in(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_transport_in_desc_t *transport_in)
+axis2_options_set_transport_in(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_transport_in_desc_t * transport_in)
 {
     options->transport_in = transport_in;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_transport_in_protocol(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_transport_in_protocol(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     const AXIS2_TRANSPORT_ENUMS transport_in_protocol)
 {
     options->transport_in_protocol = transport_in_protocol;
@@ -480,18 +511,21 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_message_id(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *message_id)
+axis2_options_set_message_id(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * message_id)
 {
-    axis2_msg_info_headers_set_message_id(options->msg_info_headers, env, message_id);
+    axis2_msg_info_headers_set_message_id(options->msg_info_headers, env,
+                                          message_id);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_properties(axis2_options_t *options,
-    const axutil_env_t *env,
-    axutil_hash_t *properties)
+axis2_options_set_properties(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axutil_hash_t * properties)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -504,52 +538,60 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_property(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *property_key,
+axis2_options_set_property(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * property_key,
     const void *property)
 {
     axutil_hash_set(options->properties, property_key,
-        AXIS2_HASH_KEY_STRING, property);
+                    AXIS2_HASH_KEY_STRING, property);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_relates_to(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_relates_to_t *relates_to)
+axis2_options_set_relates_to(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_relates_to_t * relates_to)
 {
-    axis2_msg_info_headers_set_relates_to(options->msg_info_headers, env, relates_to);
+    axis2_msg_info_headers_set_relates_to(options->msg_info_headers, env,
+                                          relates_to);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_reply_to(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *reply_to)
+axis2_options_set_reply_to(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * reply_to)
 {
-    axis2_msg_info_headers_set_reply_to(options->msg_info_headers, env, reply_to);
+    axis2_msg_info_headers_set_reply_to(options->msg_info_headers, env,
+                                        reply_to);
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_transport_out(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_transport_out_desc_t *transport_out)
+axis2_options_set_transport_out(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_transport_out_desc_t * transport_out)
 {
     options->transport_out = transport_out;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_sender_transport(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_sender_transport(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     const AXIS2_TRANSPORT_ENUMS sender_transport,
-    axis2_conf_t *conf)
+    axis2_conf_t * conf)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options->transport_out =  axis2_conf_get_transport_out(conf, env, sender_transport);
+    options->transport_out =
+        axis2_conf_get_transport_out(conf, env, sender_transport);
 
     if (!(options->transport_out))
     {
@@ -559,9 +601,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_soap_version_uri(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *soap_version_uri)
+axis2_options_set_soap_version_uri(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * soap_version_uri)
 {
     if (options->soap_version_uri)
     {
@@ -578,8 +621,9 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_timeout_in_milli_seconds(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_timeout_in_milli_seconds(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     long timeout_in_milli_seconds)
 {
     options->timeout_in_milli_seconds = timeout_in_milli_seconds;
@@ -587,8 +631,9 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_transport_info(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_transport_info(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     const AXIS2_TRANSPORT_ENUMS sender_transport,
     const AXIS2_TRANSPORT_ENUMS receiver_transport,
     const axis2_bool_t use_separate_listener)
@@ -608,7 +653,7 @@
     else
     {
         axis2_options_set_use_separate_listener(options,
-            env, use_separate_listener);
+                                                env, use_separate_listener);
     }
     axis2_options_set_transport_in_protocol(options, env, receiver_transport);
     options->sender_transport_protocol = sender_transport;
@@ -617,8 +662,9 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_use_separate_listener(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_use_separate_listener(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     axis2_bool_t use_separate_listener)
 {
     options->use_separate_listener = use_separate_listener;
@@ -626,19 +672,20 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_add_reference_parameter(axis2_options_t *options,
-    const axutil_env_t *env,
-    axiom_node_t *reference_parameter)
+axis2_options_add_reference_parameter(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axiom_node_t * reference_parameter)
 {
     axis2_msg_info_headers_add_ref_param(options->msg_info_headers,
-        env, reference_parameter);
+                                         env, reference_parameter);
     return AXIS2_SUCCESS;
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_manage_session(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_manage_session(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     axis2_bool_t manage_session)
 {
     options->manage_session = manage_session;
@@ -646,8 +693,9 @@
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_options_get_manage_session(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_manage_session(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
 
@@ -665,17 +713,19 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_msg_info_headers(axis2_options_t *options,
-    const axutil_env_t *env,
-    axis2_msg_info_headers_t *msg_info_headers)
+axis2_options_set_msg_info_headers(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axis2_msg_info_headers_t * msg_info_headers)
 {
     options->msg_info_headers = msg_info_headers;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_msg_info_headers_t *AXIS2_CALL
-axis2_options_get_msg_info_headers(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_msg_info_headers(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -683,8 +733,9 @@
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axis2_options_free(axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_free(
+    axis2_options_t * options,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, void);
 
@@ -694,7 +745,7 @@
         void *val = NULL;
         const void *key = NULL;
         for (hi = axutil_hash_first(options->properties, env);
-            hi; hi = axutil_hash_next(env, hi))
+             hi; hi = axutil_hash_next(env, hi))
         {
             axutil_property_t *property = NULL;
 
@@ -730,16 +781,18 @@
 }
 
 AXIS2_EXTERN int AXIS2_CALL
-axis2_options_get_soap_version(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_soap_version(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     return options->soap_version;
 
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_soap_version(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_soap_version(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     int soap_version)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -748,20 +801,21 @@
     {
         options->soap_version = soap_version;
         axis2_options_set_soap_version_uri(options, env,
-            AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
+                                           AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
     }
     else
     {
         options->soap_version = AXIOM_SOAP12;
         axis2_options_set_soap_version_uri(options, env,
-            AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
+                                           AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
     }
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_enable_mtom(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_enable_mtom(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     axis2_bool_t enable_mtom)
 {
     options->enable_mtom = enable_mtom;
@@ -772,31 +826,36 @@
         if (property)
         {
             axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
-            axutil_property_set_value(property, env, axutil_strdup(env, AXIS2_VALUE_TRUE));
-            axis2_options_set_property(options, env, AXIS2_ENABLE_MTOM, property);
+            axutil_property_set_value(property, env,
+                                      axutil_strdup(env, AXIS2_VALUE_TRUE));
+            axis2_options_set_property(options, env, AXIS2_ENABLE_MTOM,
+                                       property);
         }
     }
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_options_get_enable_mtom(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_enable_mtom(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     return options->enable_mtom;
 }
 
 AXIS2_EXTERN axutil_string_t *AXIS2_CALL
-axis2_options_get_soap_action(const axis2_options_t *options,
-    const axutil_env_t *env)
+axis2_options_get_soap_action(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     return options->soap_action;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_options_set_soap_action(axis2_options_t *options,
-    const axutil_env_t *env,
-    axutil_string_t *soap_action)
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_options_set_soap_action(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    axutil_string_t * soap_action)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -813,17 +872,18 @@
     return AXIS2_SUCCESS;
 }
 
-
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_options_get_xml_parser_reset(const axis2_options_t *options,
-	const axutil_env_t *env)
+axis2_options_get_xml_parser_reset(
+    const axis2_options_t * options,
+    const axutil_env_t * env)
 {
     return options->xml_parser_reset;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_options_set_xml_parser_reset(axis2_options_t *options,
-    const axutil_env_t *env,
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_options_set_xml_parser_reset(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     const axis2_bool_t xml_parser_reset)
 {
     options->xml_parser_reset = xml_parser_reset;
@@ -831,42 +891,46 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_enable_rest(axis2_options_t *options,
-    const axutil_env_t *env,
+axis2_options_set_enable_rest(
+    axis2_options_t * options,
+    const axutil_env_t * env,
     const axis2_bool_t enable_rest)
 {
     axutil_property_t *rest_property = NULL;
-    
+
     AXIS2_ENV_CHECK(env, NULL);
     if (enable_rest)
     {
         rest_property = axutil_property_create(env);
-        axutil_property_set_value(rest_property, env, axutil_strdup (env, AXIS2_VALUE_TRUE));
+        axutil_property_set_value(rest_property, env,
+                                  axutil_strdup(env, AXIS2_VALUE_TRUE));
         axis2_options_set_property(options, env, AXIS2_ENABLE_REST,
-            rest_property);
+                                   rest_property);
     }
     else
     {
         rest_property = axutil_property_create(env);
-        axutil_property_set_value(rest_property, env, axutil_strdup (env, AXIS2_VALUE_FALSE));
+        axutil_property_set_value(rest_property, env,
+                                  axutil_strdup(env, AXIS2_VALUE_FALSE));
         axis2_options_set_property(options, env, AXIS2_ENABLE_REST,
-            rest_property);
+                                   rest_property);
     }
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_options_set_http_method(axis2_options_t *options,
-    const axutil_env_t *env,
-    const axis2_char_t *http_method)
+axis2_options_set_http_method(
+    axis2_options_t * options,
+    const axutil_env_t * env,
+    const axis2_char_t * http_method)
 {
     axutil_property_t *method_property = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
     method_property = axutil_property_create(env);
-    axutil_property_set_value(method_property, env, axutil_strdup(env, http_method));
+    axutil_property_set_value(method_property, env,
+                              axutil_strdup(env, http_method));
     axis2_options_set_property(options, env, AXIS2_HTTP_METHOD,
-            method_property);
+                               method_property);
     return AXIS2_SUCCESS;
 }
-

Modified: webservices/axis2/trunk/c/src/core/clientapi/stub.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/clientapi/stub.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/src/core/clientapi/stub.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -23,9 +24,9 @@
     axis2_options_t *options;
 };
 
-
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
-axis2_stub_create(const axutil_env_t *env)
+axis2_stub_create(
+    const axutil_env_t * env)
 {
     axis2_stub_t *stub = NULL;
 
@@ -33,7 +34,7 @@
 
     stub = (axis2_stub_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_stub_t));
 
-    if (! stub)
+    if (!stub)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -45,9 +46,10 @@
 }
 
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
-axis2_stub_create_with_endpoint_ref_and_client_home(const axutil_env_t *env,
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_char_t *client_home)
+axis2_stub_create_with_endpoint_ref_and_client_home(
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * endpoint_ref,
+    const axis2_char_t * client_home)
 {
     axis2_stub_t *stub = NULL;
 
@@ -60,8 +62,8 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    /* create service_client*/
-    stub->svc_client = axis2_svc_client_create(env , client_home);
+    /* create service_client */
+    stub->svc_client = axis2_svc_client_create(env, client_home);
 
     if (!stub->svc_client)
     {
@@ -78,7 +80,7 @@
         return NULL;
     }
     /* Set service client options */
-    axis2_svc_client_set_options(stub->svc_client, env, stub-> options);
+    axis2_svc_client_set_options(stub->svc_client, env, stub->options);
 
     axis2_options_set_to(stub->options, env, endpoint_ref);
 
@@ -86,9 +88,10 @@
 }
 
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
-axis2_stub_create_with_endpoint_uri_and_client_home(const axutil_env_t *env,
-    const axis2_char_t *endpoint_uri,
-    const axis2_char_t *client_home)
+axis2_stub_create_with_endpoint_uri_and_client_home(
+    const axutil_env_t * env,
+    const axis2_char_t * endpoint_uri,
+    const axis2_char_t * client_home)
 {
     axis2_stub_t *stub = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
@@ -103,7 +106,7 @@
     }
     stub = (axis2_stub_t *)
         axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
-            client_home);
+                                                            client_home);
 
     if (!stub)
     {
@@ -115,8 +118,9 @@
 }
 
 void AXIS2_CALL
-axis2_stub_free(axis2_stub_t *stub,
-    const axutil_env_t *env)
+axis2_stub_free(
+    axis2_stub_t * stub,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, void);
 
@@ -134,19 +138,21 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_stub_set_endpoint_ref(axis2_stub_t *stub,
-    const axutil_env_t *env,
-    axis2_endpoint_ref_t *endpoint_ref)
+axis2_stub_set_endpoint_ref(
+    axis2_stub_t * stub,
+    const axutil_env_t * env,
+    axis2_endpoint_ref_t * endpoint_ref)
 {
     AXIS2_PARAM_CHECK(env->error, endpoint_ref, AXIS2_FAILURE);
-    axis2_options_set_to(stub->options , env, endpoint_ref);
+    axis2_options_set_to(stub->options, env, endpoint_ref);
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_stub_set_endpoint_uri(axis2_stub_t *stub,
-    const axutil_env_t *env,
-    const axis2_char_t *endpoint_uri)
+axis2_stub_set_endpoint_uri(
+    axis2_stub_t * stub,
+    const axutil_env_t * env,
+    const axis2_char_t * endpoint_uri)
 {
     axis2_endpoint_ref_t *endpoint_ref = NULL;
 
@@ -158,24 +164,26 @@
     {
         return AXIS2_FAILURE;
     }
-    axis2_options_set_to(stub->options , env, endpoint_ref);
+    axis2_options_set_to(stub->options, env, endpoint_ref);
 
     return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_stub_set_use_separate_listener(axis2_stub_t *stub,
-    const axutil_env_t *env,
+axis2_stub_set_use_separate_listener(
+    axis2_stub_t * stub,
+    const axutil_env_t * env,
     const axis2_bool_t use_separate_listener)
 {
-    return axis2_options_set_use_separate_listener(stub-> options, env,
-            use_separate_listener);
+    return axis2_options_set_use_separate_listener(stub->options, env,
+                                                   use_separate_listener);
 }
 
 axis2_status_t AXIS2_CALL
-axis2_stub_engage_module(axis2_stub_t *stub,
-    const axutil_env_t *env,
-    const axis2_char_t *module_name)
+axis2_stub_engage_module(
+    axis2_stub_t * stub,
+    const axutil_env_t * env,
+    const axis2_char_t * module_name)
 {
     AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
 
@@ -183,42 +191,43 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_stub_set_soap_version(axis2_stub_t *stub,
-    const axutil_env_t *env,
+axis2_stub_set_soap_version(
+    axis2_stub_t * stub,
+    const axutil_env_t * env,
     int soap_version)
 {
-    if (!stub-> options)
+    if (!stub->options)
     {
         return AXIS2_FAILURE;
     }
-    return axis2_options_set_soap_version(stub-> options, env, soap_version);
+    return axis2_options_set_soap_version(stub->options, env, soap_version);
 }
 
 const axis2_char_t *AXIS2_CALL
-axis2_stub_get_svc_ctx_id(const axis2_stub_t *stub,
-    const axutil_env_t *env)
+axis2_stub_get_svc_ctx_id(
+    const axis2_stub_t * stub,
+    const axutil_env_t * env)
 {
     const axis2_svc_ctx_t *svc_ctx = NULL;
     const axis2_char_t *svc_ctx_id = NULL;
 
     svc_ctx = axis2_svc_client_get_svc_ctx(stub->svc_client, env);
-    svc_ctx_id =  axis2_svc_ctx_get_svc_id(svc_ctx, env);
+    svc_ctx_id = axis2_svc_ctx_get_svc_id(svc_ctx, env);
     return svc_ctx_id;
 }
 
 axis2_svc_client_t *AXIS2_CALL
-axis2_stub_get_svc_client(const axis2_stub_t *stub,
-    const axutil_env_t *env)
+axis2_stub_get_svc_client(
+    const axis2_stub_t * stub,
+    const axutil_env_t * env)
 {
     return stub->svc_client;
 }
 
 axis2_options_t *AXIS2_CALL
-axis2_stub_get_options(const axis2_stub_t *stub,
-    const axutil_env_t *env)
+axis2_stub_get_options(
+    const axis2_stub_t * stub,
+    const axutil_env_t * env)
 {
     return stub->options;
 }
-
-
-



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