axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r440661 - in /webservices/axis2/trunk/c: include/ modules/core/transport/http/ modules/core/transport/http/sender/ modules/core/transport/http/server/apache2/ modules/core/transport/http/server/simple_axis2_server/
Date Wed, 06 Sep 2006 09:07:03 GMT
Author: pini
Date: Wed Sep  6 02:07:02 2006
New Revision: 440661

URL: http://svn.apache.org/viewvc?view=rev&rev=440661
Log:
Fomatting fixes and parameter changes to const.

Modified:
    webservices/axis2/trunk/c/include/axis2_rest_sender.h
    webservices/axis2/trunk/c/modules/core/transport/http/http_request_line.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_out_transport_info.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_stream.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_out_transport_info.h
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_worker.h
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/mod_axis2.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c

Modified: webservices/axis2/trunk/c/include/axis2_rest_sender.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_rest_sender.h?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_rest_sender.h (original)
+++ webservices/axis2/trunk/c/include/axis2_rest_sender.h Wed Sep  6 02:07:02 2006
@@ -13,11 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #ifndef AXIS2_REST_SENDER_H
 #define AXIS2_REST_SENDER_H
 
 /**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
  * @file axis2_rest_sender.h
  * @brief axis2 REST sender
  */
@@ -32,88 +37,159 @@
 
 
 #ifdef __cplusplus
-extern "C" 
+extern "C"
 {
 #endif
-/** 
-  * @ingroup axis2_core_transport_http
-  * @{
-  */
-
-typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
-typedef struct axis2_rest_sender axis2_rest_sender_t;
-    
-    
-/** 
- * @brief REST sender ops struct
- * Encapsulator struct for ops of axis2_rest_sender
- */
-AXIS2_DECLARE_DATA struct axis2_rest_sender_ops
-{
-   axis2_status_t (AXIS2_CALL *send) 
-                                (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                        axiom_node_t *out, 
-                        const axis2_char_t *str_url);
-   
-   axis2_status_t (AXIS2_CALL *set_chunked) 
-                                (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axis2_bool_t chunked);
-   
-   axis2_status_t (AXIS2_CALL *set_om_output)
-                                (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axiom_output_t *om_output);
-   
-   axis2_status_t (AXIS2_CALL *set_http_version)
-                        (axis2_rest_sender_t *sender, 
-                        const axis2_env_t *env, axis2_char_t *version);
-   
-   axis2_status_t (AXIS2_CALL *free) 
-                                (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env);
-};
-
-    
-axis2_status_t AXIS2_CALL 
-axis2_rest_sender_get_header_info 
-                        (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_process_response 
-                        (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_get_timeout_values 
-                        (axis2_rest_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-
-/**
- * @brief REST sender struct
- * Axis2 REST sender
- */
-AXIS2_DECLARE_DATA struct axis2_rest_sender
-{
-   axis2_rest_sender_ops_t *ops;
-};
 
-
-AXIS2_EXTERN axis2_rest_sender_t * AXIS2_CALL 
-axis2_rest_sender_create(const axis2_env_t *env);
+    /** Type name for struct axis2_rest_sender_ops */
+    typedef struct axis2_rest_sender_ops axis2_rest_sender_ops_t;
+    /** Type name for struct axis2_rest_sender */
+    typedef struct axis2_rest_sender axis2_rest_sender_t;
+
+
+    /**
+     * @brief REST sender ops struct
+     * Encapsulator struct for ops of axis2_rest_sender
+     */
+    struct axis2_rest_sender_ops
+    {
+        /**
+         * @param sender pointer to sender
+         * @param env pointer to environment struct
+         * @param msg_ctx pointer to message context
+         * @param out out
+         * @param str_url str_url
+         */
+        axis2_status_t (AXIS2_CALL *
+                send)(
+                    axis2_rest_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_msg_ctx_t *msg_ctx,
+                    axiom_node_t *out,
+                    const axis2_char_t *str_url);
+
+        /**
+         * @param sender pointer to sender
+         * @param env pointer to environment struct
+         * @param chuncked chuncked
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_chunked)(
+                    axis2_rest_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_bool_t chunked);
+
+        /**
+         * @param sender pointer to sender
+         * @param env pointer to environment struct
+         * @param om_output om_output
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_om_output)(
+                    axis2_rest_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axiom_output_t *om_output);
+
+        /**
+         * @param sender pointer to sender
+         * @param env pointer to environment struct
+         * @param version pointer to version
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_http_version)(
+                    axis2_rest_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_char_t *version);
+
+        /**
+         * @param sender pointer to sender
+         * @param env pointer to environment struct
+         */
+        axis2_status_t (AXIS2_CALL *
+                free)(
+                    axis2_rest_sender_t *sender,
+                    const axis2_env_t *env);
+    };
+
+
+    /**
+     * @param sender pointer to sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context
+     * @param respoinse pointer to response
+     */
+    axis2_status_t AXIS2_CALL
+    axis2_rest_sender_get_header_info(
+        axis2_rest_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_http_simple_response_t *response);
+
+    /**
+     * @param sender pointer to sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context
+     * @param response response
+     */
+    axis2_status_t AXIS2_CALL
+    axis2_rest_sender_process_response(
+        axis2_rest_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_http_simple_response_t *response);
+
+    /**
+     * @param sender pointer to sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context struct
+     */
+    axis2_status_t AXIS2_CALL
+    axis2_rest_sender_get_timeout_values(
+        axis2_rest_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Axis2 REST sender
+     */
+    struct axis2_rest_sender
+    {
+        /** Operations of REST sender */
+        axis2_rest_sender_ops_t *ops;
+    };
+
+
+    /** 
+     * @param env pointer to environment struct
+     */
+    AXIS2_EXTERN axis2_rest_sender_t *AXIS2_CALL
+    axis2_rest_sender_create(
+        const axis2_env_t *env);
 
 /********************* Start of function macros   ***************************/
 
+/** Send.
+    @sa axis2_rest_sender_ops#send */
 #define AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, output, url)\
                         ((sender)->ops->send (sender, env, msg_ctx,output, url))
+
+/** Set chunked.
+    @sa axis2_rest_sender_ops#set_chunked */
 #define AXIS2_REST_SENDER_SET_CHUNKED(sender, env, chunked) \
                         ((sender)->ops->set_chunked(sender, env, chunked))
+
+/** Set om output.
+    @sa axis2_rest_sender_ops#set_om_output */
 #define AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
                         ((sender)->ops->set_om_output (sender, env, om_output))
+
+/** Set http version.
+    @sa axis2_rest_sender_ops#set_http_version */
 #define AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, version)\
                         ((sender)->ops->set_http_version (sender, env, version))
+
+/** Frees the rest sender.
+    @sa axis2_rest_sender_ops#free */
 #define AXIS2_REST_SENDER_FREE(sender, env) \
                         ((sender)->ops->free(sender, env))
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_request_line.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_request_line.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_request_line.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_request_line.c Wed Sep  6 02:07:02 2006
@@ -30,7 +30,8 @@
     axis2_char_t *http_version;
     axis2_char_t *method;
     axis2_char_t *uri;
-}axis2_http_request_line_impl_t;
+}
+axis2_http_request_line_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(request_line) \
                  ((axis2_http_request_line_impl_t *)(request_line))
@@ -41,36 +42,44 @@
  *  This is just a function
  *  Not assciated with an ops struct
  */
-axis2_http_request_line_t* AXIS2_CALL
-axis2_http_request_line_parse_line(const axis2_env_t *env, const axis2_char_t *str);
-
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_method(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env);
-
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_http_version
-(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env);
-
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_uri(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env);
-
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_to_string(axis2_http_request_line_t *request_line,
-        const axis2_env_t *env);
+axis2_http_request_line_t *AXIS2_CALL
+axis2_http_request_line_parse_line(
+    const axis2_env_t *env, 
+    const axis2_char_t *str);
+
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_method(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_http_version(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_uri(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_to_string(
+    axis2_http_request_line_t *request_line,
+    const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL
-axis2_http_request_line_free(axis2_http_request_line_t *request_line,
-        const axis2_env_t *env);
+axis2_http_request_line_free(
+    axis2_http_request_line_t *request_line,
+    const axis2_env_t *env);
+
 /***************************** End of function headers ************************/
 
-AXIS2_EXTERN axis2_http_request_line_t * AXIS2_CALL
-axis2_http_request_line_create(const axis2_env_t *env,
-        const axis2_char_t *method,
-        const axis2_char_t *uri,
-        const axis2_char_t *http_version)
+AXIS2_EXTERN axis2_http_request_line_t *AXIS2_CALL
+axis2_http_request_line_create(
+    const axis2_env_t *env,
+    const axis2_char_t *method,
+    const axis2_char_t *uri,
+    const axis2_char_t *http_version)
 {
     axis2_http_request_line_impl_t *request_line_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -96,7 +105,7 @@
             sizeof(axis2_http_request_line_ops_t));
     if(NULL == request_line_impl->request_line.ops)
     {
-        axis2_http_request_line_free((axis2_http_request_line_t*)
+        axis2_http_request_line_free((axis2_http_request_line_t *)
                 request_line_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -116,8 +125,9 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_http_request_line_free(axis2_http_request_line_t *request_line,
-        const axis2_env_t *env)
+axis2_http_request_line_free(
+    axis2_http_request_line_t *request_line,
+    const axis2_env_t *env)
 {
     axis2_http_request_line_impl_t *request_line_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -145,8 +155,10 @@
     return AXIS2_SUCCESS;
 }
 
-AXIS2_EXTERN axis2_http_request_line_t* AXIS2_CALL
-axis2_http_request_line_parse_line(const axis2_env_t *env, const axis2_char_t *str)
+AXIS2_EXTERN axis2_http_request_line_t *AXIS2_CALL
+axis2_http_request_line_parse_line(
+    const axis2_env_t *env, 
+    const axis2_char_t *str)
 {
     axis2_char_t *req_line = NULL;
     axis2_char_t *method = NULL;
@@ -209,37 +221,40 @@
 }
 
 
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_method(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env)
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_method(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(request_line)->method;
 }
 
 
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_http_version
-(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env)
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_http_version(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(request_line)->http_version;
 }
 
 
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_get_uri(const axis2_http_request_line_t *request_line,
-        const axis2_env_t *env)
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_get_uri(
+    const axis2_http_request_line_t *request_line,
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(request_line)->uri;
 }
 
 
-axis2_char_t* AXIS2_CALL
-axis2_http_request_line_to_string(axis2_http_request_line_t *request_line,
-        const axis2_env_t *env)
+axis2_char_t *AXIS2_CALL
+axis2_http_request_line_to_string(
+    axis2_http_request_line_t *request_line,
+    const axis2_env_t *env)
 {
     axis2_http_request_line_impl_t *req_line_impl = NULL;
     int alloc_len = 0;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c Wed Sep  6 02:07:02 2006
@@ -35,10 +35,8 @@
  * @brief REST sender struct impl
  *   Axis2 REST sender impl  
  */
-typedef struct axis2_rest_sender_impl
-            axis2_rest_sender_impl_t;
 
-struct axis2_rest_sender_impl
+typedef struct axis2_rest_sender_impl
 {
     axis2_rest_sender_t sender;
     axis2_char_t *http_version;
@@ -47,58 +45,81 @@
     int connection_timeout;
     axiom_output_t *om_output;
     axis2_http_client_t *client;
-};
+}
+axis2_rest_sender_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(sender) \
                        ((axis2_rest_sender_impl_t *)(sender))
 
 /***************************** Function headers *******************************/
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_get_header_info(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_process_response(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_get_timeout_values(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_send(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axiom_node_t *out, 
+axis2_rest_sender_get_header_info(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_process_response(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_get_timeout_values(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_send(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axiom_node_t *out,
     const axis2_char_t *str_url);
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_chunked(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_bool_t chunked);
+axis2_rest_sender_set_chunked(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_bool_t chunked);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_set_om_output(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axiom_output_t *om_output);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_set_http_version(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_char_t *version);
+
+axis2_char_t *AXIS2_CALL
+axis2_rest_sender_get_param_string(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_rest_sender_free(
+    axis2_rest_sender_t *sender, 
+    const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+axis2_rest_sender_get_param_string(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
 
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_om_output(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axiom_output_t *om_output);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_http_version(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_char_t *version);
-
-axis2_char_t * AXIS2_CALL
-axis2_rest_sender_get_param_string(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-
-axis2_status_t AXIS2_CALL
-axis2_rest_sender_free(axis2_rest_sender_t *sender, const axis2_env_t *env);
-
-axis2_char_t * AXIS2_CALL
-axis2_rest_sender_get_param_string(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
 /***************************** End of function headers ************************/
 
-AXIS2_EXTERN axis2_rest_sender_t * AXIS2_CALL
-axis2_rest_sender_create(const axis2_env_t *env)
+AXIS2_EXTERN axis2_rest_sender_t *AXIS2_CALL
+axis2_rest_sender_create(
+    const axis2_env_t *env)
 {
     axis2_rest_sender_impl_t *sender_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -132,7 +153,7 @@
 
     sender_impl->sender.ops->send = axis2_rest_sender_send;
     sender_impl->sender.ops->set_chunked = axis2_rest_sender_set_chunked;
-    sender_impl->sender.ops->set_om_output = axis2_rest_sender_set_om_output; 
+    sender_impl->sender.ops->set_om_output = axis2_rest_sender_set_om_output;
     sender_impl->sender.ops->set_http_version =
         axis2_rest_sender_set_http_version;
     sender_impl->sender.ops->free = axis2_rest_sender_free;
@@ -140,8 +161,9 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_free (axis2_rest_sender_t *sender,
-        const axis2_env_t *env)
+axis2_rest_sender_free(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env)
 {
     axis2_rest_sender_impl_t *sender_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -165,9 +187,11 @@
 
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_send(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axiom_node_t *out, 
+axis2_rest_sender_send(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axiom_node_t *out,
     const axis2_char_t *str_url)
 {
     axis2_http_simple_request_t *request = NULL;
@@ -219,9 +243,9 @@
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_CLIENT,
             property, AXIS2_TRUE);
 
-    method = (axis2_char_t*)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+    method = (axis2_char_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
             AXIS2_HTTP_METHOD, AXIS2_FALSE);
-    
+
     /* The default is POST */
     if(NULL != method && 0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_GET))
     {
@@ -236,7 +260,7 @@
             return AXIS2_FAILURE;
         }
         xml_writer = AXIOM_OUTPUT_GET_XML_WRITER(sender_impl->om_output, env);
-        
+
         property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
                 AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
         if (property)
@@ -253,7 +277,7 @@
          */
         AXIOM_NODE_SERIALIZE (out, env, sender_impl->om_output);
         buffer = AXIOM_XML_WRITER_GET_XML(xml_writer, env);
-        
+
         if (NULL == buffer)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL xml returned"
@@ -268,15 +292,15 @@
     {
         axis2_char_t *request_params = NULL;
         axis2_char_t *path = NULL;
-        
-        request_params = axis2_rest_sender_get_param_string(sender, env, 
+
+        request_params = axis2_rest_sender_get_param_string(sender, env,
                 msg_ctx);
-        path = axis2_strcat(env, AXIS2_URL_GET_PATH(url, env), "?", 
+        path = axis2_strcat(env, AXIS2_URL_GET_PATH(url, env), "?",
                 request_params, NULL);
-        request_line = axis2_http_request_line_create(env, "GET", path, 
+        request_line = axis2_http_request_line_create(env, "GET", path,
                 sender_impl->http_version);
     }
-    
+
     request = axis2_http_simple_request_create(env, request_line, NULL, 0,
             NULL);
 
@@ -302,12 +326,12 @@
         }
         /* TODO we need to set the content type with soap action header for soap12*/
         content_type = AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
-        http_header = axis2_http_header_create(env, 
+        http_header = axis2_http_header_create(env,
                 AXIS2_HTTP_HEADER_CONTENT_TYPE, content_type);
         AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
         AXIS2_HTTP_SIMPLE_REQUEST_SET_BODY_STRING(request, env, buffer);
     }
-    
+
     if (0 == AXIS2_STRCMP(sender_impl->http_version,
             AXIS2_HTTP_HEADER_PROTOCOL_11))
     {
@@ -373,8 +397,10 @@
 
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_chunked(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_bool_t chunked)
+axis2_rest_sender_set_chunked(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_bool_t chunked)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(sender)->chunked = chunked;
@@ -383,8 +409,10 @@
 
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_om_output(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axiom_output_t *om_output)
+axis2_rest_sender_set_om_output(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axiom_output_t *om_output)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(sender)->om_output = om_output;
@@ -393,9 +421,11 @@
 
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_get_header_info(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axis2_http_simple_response_t *response)
+axis2_rest_sender_get_header_info(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response)
 {
     axis2_array_list_t *headers = NULL;
     axis2_char_t *charset = NULL;
@@ -492,9 +522,11 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_process_response(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-        axis2_http_simple_response_t *response)
+axis2_rest_sender_process_response(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response)
 {
     axis2_stream_t *in_stream = NULL;
     axis2_property_t *property = NULL;
@@ -526,8 +558,10 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_get_timeout_values(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axis2_rest_sender_get_timeout_values(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_char_t *so_str = NULL;
     axis2_char_t *connection_str = NULL;
@@ -551,7 +585,7 @@
             AXIS2_HTTP_CONNECTION_TIMEOUT);
     if (NULL != tmp_param)
     {
-        connection_str = (axis2_char_t*)AXIS2_PARAM_GET_VALUE(tmp_param, env);
+        connection_str = (axis2_char_t *)AXIS2_PARAM_GET_VALUE(tmp_param, env);
         if (NULL != connection_str)
         {
             AXIS2_INTF_TO_IMPL(sender)->connection_timeout =
@@ -562,8 +596,10 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_rest_sender_set_http_version(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_char_t *version)
+axis2_rest_sender_set_http_version(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_char_t *version)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(sender)->http_version = AXIS2_STRDUP(version, env);
@@ -574,9 +610,11 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_char_t * AXIS2_CALL
-axis2_rest_sender_get_param_string(axis2_rest_sender_t *sender,
-        const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axis2_char_t *AXIS2_CALL
+axis2_rest_sender_get_param_string(
+    axis2_rest_sender_t *sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     axiom_soap_envelope_t *soap_env = NULL;
     axiom_node_t *body_node = NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_out_transport_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_out_transport_info.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_out_transport_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_out_transport_info.c Wed Sep  6 02:07:02 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include "axis2_apache2_out_transport_info.h"
 #include <axis2_string.h>
 #include <axis2_http_transport.h>
@@ -21,90 +21,93 @@
 #include <apr_strings.h>
 
 
-/** 
+/**
  * @brief Apache2 Out transport info impl structure
  *   Axis2 apache2_out_transport_info_impl
  */
-typedef struct axis2_apache2_out_transport_info_impl 
-            axis2_apache2_out_transport_info_impl_t;  
-  
-struct axis2_apache2_out_transport_info_impl
+
+typedef struct axis2_apache2_out_transport_info_impl
 {
-   axis2_http_out_transport_info_t out_transport_info;
-   request_rec *request;
+    axis2_http_out_transport_info_t out_transport_info;
+    request_rec *request;
     axis2_char_t *encoding;
-};
+}
+axis2_apache2_out_transport_info_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(out_transport_info) \
                 ((axis2_apache2_out_transport_info_impl_t *)(out_transport_info))
 
 /***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_set_content_type 
-            (axis2_http_out_transport_info_t *info, const axis2_env_t *env, 
-            const axis2_char_t *content_type);
-    
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_set_char_encoding 
-            (axis2_http_out_transport_info_t *info, const axis2_env_t *env,
-            const axis2_char_t *encoding);
-    
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_free 
-            (axis2_http_out_transport_info_t *out_transport_info, 
-            const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_set_content_type(
+    axis2_http_out_transport_info_t *info, 
+    const axis2_env_t *env,
+    const axis2_char_t *content_type);
+
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_set_char_encoding(
+    axis2_http_out_transport_info_t *info, 
+    const axis2_env_t *env,
+    const axis2_char_t *encoding);
+
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_free(
+    axis2_http_out_transport_info_t *out_transport_info,
+    const axis2_env_t *env);
 
 /***************************** End of function headers ************************/
 
-axis2_http_out_transport_info_t * AXIS2_CALL 
-axis2_apache2_out_transport_info_create(const axis2_env_t *env,
-                        request_rec *request)
+axis2_http_out_transport_info_t *AXIS2_CALL
+axis2_apache2_out_transport_info_create(
+    const axis2_env_t *env,
+    request_rec *request)
 {
     axis2_apache2_out_transport_info_impl_t *info_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-        
-    info_impl = (axis2_apache2_out_transport_info_impl_t *)AXIS2_MALLOC 
-                        (env->allocator, sizeof(
+
+    info_impl = (axis2_apache2_out_transport_info_impl_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
                         axis2_apache2_out_transport_info_impl_t));
-   
+
     if(NULL == info_impl)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
+    }
     info_impl->request = request;
-     info_impl->encoding = NULL;  
-     
+    info_impl->encoding = NULL;
+
     info_impl->out_transport_info.ops = AXIS2_MALLOC(env->allocator,
-                    sizeof(axis2_http_out_transport_info_ops_t));
+            sizeof(axis2_http_out_transport_info_ops_t));
     if(NULL == info_impl->out_transport_info.ops)
-   {
-      axis2_http_out_transport_info_free((axis2_http_out_transport_info_t*)
-                         info_impl, env);
+    {
+        axis2_http_out_transport_info_free((axis2_http_out_transport_info_t *)
+                info_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-      return NULL;
-   }
+        return NULL;
+    }
+
+    info_impl->out_transport_info.ops->set_content_type =
+        axis2_http_out_transport_info_set_content_type;
+    info_impl->out_transport_info.ops->set_char_encoding =
+        axis2_http_out_transport_info_set_char_encoding;
+    info_impl->out_transport_info.ops->free =
+        axis2_http_out_transport_info_free;
 
-    info_impl->out_transport_info.ops->set_content_type = 
-                  axis2_http_out_transport_info_set_content_type;
-    info_impl->out_transport_info.ops->set_char_encoding = 
-                  axis2_http_out_transport_info_set_char_encoding;
-    info_impl->out_transport_info.ops->free = 
-                  axis2_http_out_transport_info_free;
-                        
-   return &(info_impl->out_transport_info);
+    return &(info_impl->out_transport_info);
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_free (axis2_http_out_transport_info_t *info, 
-                  const axis2_env_t *env)
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_free(
+    axis2_http_out_transport_info_t *info,
+    const axis2_env_t *env)
 {
     axis2_apache2_out_transport_info_impl_t *info_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     info_impl = AXIS2_INTF_TO_IMPL(info);
-   
-   info_impl->request = NULL; /* request doesn't belong to info */
+
+    info_impl->request = NULL; /* request doesn't belong to info */
     if(NULL != info_impl->encoding)
     {
         AXIS2_FREE(env->allocator, info_impl->encoding);
@@ -112,71 +115,74 @@
     }
     if(NULL != info->ops)
         AXIS2_FREE(env->allocator, info->ops);
-    
-   AXIS2_FREE(env->allocator, info_impl);
-   return AXIS2_SUCCESS;
+
+    AXIS2_FREE(env->allocator, info_impl);
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_apache2_out_transport_info_free_void_arg (void *transport_info,
-                                             const axis2_env_t *env)
+axis2_apache2_out_transport_info_free_void_arg(
+    void *transport_info,
+    const axis2_env_t *env)
 {
     axis2_http_out_transport_info_t *transport_info_l = NULL;
-    
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     transport_info_l = (axis2_http_out_transport_info_t *) transport_info;
     return axis2_http_out_transport_info_free(transport_info_l, env);
 }
 
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_set_content_type 
-            (axis2_http_out_transport_info_t *info, const axis2_env_t *env, 
-            const axis2_char_t *content_type)
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_set_content_type(
+    axis2_http_out_transport_info_t *info, 
+    const axis2_env_t *env,
+    const axis2_char_t *content_type)
 {
     axis2_char_t *tmp1 = NULL;
-   axis2_char_t *tmp2 = NULL;
-   axis2_apache2_out_transport_info_impl_t *info_impl = NULL;
-   
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    axis2_char_t *tmp2 = NULL;
+    axis2_apache2_out_transport_info_impl_t *info_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, content_type, AXIS2_FAILURE);
-   
-   info_impl = AXIS2_INTF_TO_IMPL(info);
-   
-   if(NULL != info_impl->encoding)
-   {
-      
-      tmp1 = AXIS2_STRACAT(content_type, ";charset=", env);
-      tmp2 = AXIS2_STRACAT(tmp1, info_impl->encoding, env);
+
+    info_impl = AXIS2_INTF_TO_IMPL(info);
+
+    if(NULL != info_impl->encoding)
+    {
+
+        tmp1 = AXIS2_STRACAT(content_type, ";charset=", env);
+        tmp2 = AXIS2_STRACAT(tmp1, info_impl->encoding, env);
+        info_impl->request->content_type = apr_pstrdup(info_impl->request->pool,
+                tmp2);
+        AXIS2_FREE(env->allocator, tmp1);
+        AXIS2_FREE(env->allocator, tmp2);
+    }
+    else
+    {
         info_impl->request->content_type = apr_pstrdup(info_impl->request->pool,
-                        tmp2);
-      AXIS2_FREE(env->allocator, tmp1);
-      AXIS2_FREE(env->allocator, tmp2);      
-   }
-   else
-   {
-      info_impl->request->content_type = apr_pstrdup(info_impl->request->pool, 
-                        content_type);
-   }
-   return AXIS2_SUCCESS;
+                content_type);
+    }
+    return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_out_transport_info_set_char_encoding 
-            (axis2_http_out_transport_info_t *info, const axis2_env_t *env,
-            const axis2_char_t *encoding)
+axis2_status_t AXIS2_CALL
+axis2_http_out_transport_info_set_char_encoding(
+    axis2_http_out_transport_info_t *info, 
+    const axis2_env_t *env,
+    const axis2_char_t *encoding)
 {
     axis2_apache2_out_transport_info_impl_t *info_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE);
-   
+    AXIS2_PARAM_CHECK(env->error, encoding, AXIS2_FAILURE);
+
     info_impl = AXIS2_INTF_TO_IMPL(info);
-   
-   if(NULL != info_impl->encoding)
-   {
-      AXIS2_FREE(env->allocator, info_impl->encoding);
-   }
-   info_impl->encoding = AXIS2_STRDUP(encoding, env);
-   
-   return AXIS2_SUCCESS;
+
+    if(NULL != info_impl->encoding)
+    {
+        AXIS2_FREE(env->allocator, info_impl->encoding);
+    }
+    info_impl->encoding = AXIS2_STRDUP(encoding, env);
+
+    return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_stream.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_stream.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_stream.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_stream.c Wed Sep  6 02:07:02 2006
@@ -23,108 +23,135 @@
  * @brief Stream struct impl
  *   Streaming mechanisms for Apache2 web server 
  */
-typedef struct apache2_stream_impl apache2_stream_impl_t;
   
-struct apache2_stream_impl
+typedef struct apache2_stream_impl
 {
    axis2_stream_t stream;
     axis2_stream_type_t stream_type;
     request_rec *request;   
-};
+}
+apache2_stream_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(stream) ((apache2_stream_impl_t *)(stream))
 
 /********************************Function headers******************************/
 axis2_status_t AXIS2_CALL 
-apache2_stream_free (axis2_stream_t *stream, const axis2_env_t *env);
+apache2_stream_free(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env);
 
 axis2_stream_type_t AXIS2_CALL
-apache2_stream_get_type (axis2_stream_t *stream, const axis2_env_t *env);
+apache2_stream_get_type(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env);
 
 int AXIS2_CALL
-apache2_stream_write(axis2_stream_t *stream, const axis2_env_t *env, 
-                  const void *buffer, size_t count);
+apache2_stream_write(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    const void *buffer, 
+    size_t count);
+
 int AXIS2_CALL 
-apache2_stream_read(axis2_stream_t *stream, const axis2_env_t *env, 
-                  void *buffer, size_t count);
+apache2_stream_read(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    void *buffer, 
+    size_t count);
+
 int AXIS2_CALL 
-apache2_stream_skip(axis2_stream_t *stream, const axis2_env_t *env, int count);
+apache2_stream_skip(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    int count);
 
 int AXIS2_CALL 
-apache2_stream_get_char(axis2_stream_t *stream, const axis2_env_t *env);
+apache2_stream_get_char(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env);
 
 /************************* End of function headers ****************************/
 /*
  * Internal function. Not exposed to outside
  */
 AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
-axis2_stream_create_apache2(const axis2_env_t *env, request_rec *request)
+axis2_stream_create_apache2(
+    const axis2_env_t *env, 
+    request_rec *request)
 {
     apache2_stream_impl_t *stream_impl = NULL;
-   AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, request, NULL);
        
     stream_impl = (apache2_stream_impl_t *)AXIS2_MALLOC(
                         env->allocator, sizeof(apache2_stream_impl_t));
    
-   if(NULL == stream_impl)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+    if(NULL == stream_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
+    }
     
     stream_impl->request = request;
     stream_impl->stream_type = AXIS2_STREAM_MANAGED;
-   stream_impl->stream.ops = (axis2_stream_ops_t *) AXIS2_MALLOC (
+    stream_impl->stream.ops = (axis2_stream_ops_t *) AXIS2_MALLOC (
                         env->allocator, sizeof (axis2_stream_ops_t));
-   if (NULL == stream_impl->stream.ops)
-   {
-      apache2_stream_free(&(stream_impl->stream), env);
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-      return NULL;
-   }
+    if (NULL == stream_impl->stream.ops)
+    {
+        apache2_stream_free(&(stream_impl->stream), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
        
-   stream_impl->stream.ops->free_fn = apache2_stream_free;
+    stream_impl->stream.ops->free_fn = apache2_stream_free;
     stream_impl->stream.ops->read = apache2_stream_read;
     stream_impl->stream.ops->write = apache2_stream_write;
     stream_impl->stream.ops->skip = apache2_stream_skip;
     stream_impl->stream.ops->get_char = apache2_stream_get_char;
     stream_impl->stream.ops->get_type = apache2_stream_get_type;
     
-   return &(stream_impl->stream);
+    return &(stream_impl->stream);
 }
 
 
 axis2_status_t AXIS2_CALL
-apache2_stream_free (axis2_stream_t *stream, const axis2_env_t *env)
+apache2_stream_free(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env)
 {
     apache2_stream_impl_t *stream_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
    
-   stream_impl = AXIS2_INTF_TO_IMPL(stream);
-   if (NULL != stream_impl->stream.ops)
+    stream_impl = AXIS2_INTF_TO_IMPL(stream);
+    if (NULL != stream_impl->stream.ops)
     {
         AXIS2_FREE (env->allocator, stream_impl->stream.ops);
     }
-      AXIS2_FREE(env->allocator, stream_impl);
+    AXIS2_FREE(env->allocator, stream_impl);
    
     return AXIS2_SUCCESS;
 }
 
 int AXIS2_CALL 
-apache2_stream_read(axis2_stream_t *stream, const axis2_env_t *env, 
-                  void *buffer, size_t count)
+apache2_stream_read(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    void *buffer, 
+    size_t count)
 {
     apache2_stream_impl_t *stream_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
     
     stream_impl = AXIS2_INTF_TO_IMPL(stream);
     return ap_get_client_block(stream_impl->request, buffer, count);
 }
 
 int AXIS2_CALL
-apache2_stream_write(axis2_stream_t *stream, const axis2_env_t *env, 
-                  const void *buf, size_t count)
+apache2_stream_write(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    const void *buf, 
+    size_t count)
 {
    apache2_stream_impl_t *stream_impl = NULL;
     char *write_buf = NULL;
@@ -165,13 +192,16 @@
 
 
 int AXIS2_CALL 
-apache2_stream_skip(axis2_stream_t *stream, const axis2_env_t *env, int count)
+apache2_stream_skip(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env, 
+    int count)
 {
-   apache2_stream_impl_t *stream_impl = NULL;
+    apache2_stream_impl_t *stream_impl = NULL;
     axis2_char_t *tmp_buffer = NULL;
     int len = -1;
-   AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
-   stream_impl = AXIS2_INTF_TO_IMPL(stream);
+    AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
+    stream_impl = AXIS2_INTF_TO_IMPL(stream);
     
     tmp_buffer = AXIS2_MALLOC(env->allocator, count * sizeof(axis2_char_t));
     if(tmp_buffer == NULL)
@@ -187,17 +217,21 @@
 }
 
 int AXIS2_CALL 
-apache2_stream_get_char(axis2_stream_t *stream, const axis2_env_t *env)
+apache2_stream_get_char(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env)
 {
-   int ret = -1;
-   AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
+    int ret = -1;
+    AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
     
     /* TODO implement this */
     return ret;
 }
 
 axis2_stream_type_t AXIS2_CALL
-apache2_stream_get_type (axis2_stream_t *stream, const axis2_env_t *env)
+apache2_stream_get_type(
+    axis2_stream_t *stream, 
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
     return AXIS2_INTF_TO_IMPL(stream)->stream_type;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c Wed Sep  6 02:07:02 2006
@@ -36,13 +36,13 @@
  * @brief Apahche2 Worker struct impl
  *   Axis2 Apache2 Worker impl  
  */
-typedef struct axis2_apache2_worker_impl axis2_apache2_worker_impl_t;  
   
-struct axis2_apache2_worker_impl
+typedef struct axis2_apache2_worker_impl
 {
    axis2_apache2_worker_t apache2_worker;
    axis2_conf_ctx_t *conf_ctx;
-};
+}
+axis2_apache2_worker_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(apache2_worker) ((axis2_apache2_worker_impl_t *)\
                         (apache2_worker))
@@ -50,21 +50,27 @@
 /***************************** Function headers *******************************/
 
 int AXIS2_CALL 
-axis2_apache2_worker_process_request(axis2_apache2_worker_t *apache2_worker, 
-                     const axis2_env_t *env, request_rec *req);
-    
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_apache2_worker_get_bytes(const axis2_env_t *env, 
-                        axis2_stream_t *stream);
+axis2_apache2_worker_process_request(
+    axis2_apache2_worker_t *apache2_worker, 
+    const axis2_env_t *env, 
+    request_rec *req);
+    
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_apache2_worker_get_bytes(
+    const axis2_env_t *env, 
+    axis2_stream_t *stream);
                         
 axis2_status_t AXIS2_CALL 
-axis2_apache2_worker_free(axis2_apache2_worker_t *apache2_worker, 
-                     const axis2_env_t *env);
+axis2_apache2_worker_free(
+    axis2_apache2_worker_t *apache2_worker, 
+    const axis2_env_t *env);
                         
 /***************************** End of function headers ************************/
 
-AXIS2_EXTERN axis2_apache2_worker_t * AXIS2_CALL
-axis2_apache2_worker_create (const axis2_env_t *env, axis2_char_t *repo_path)
+AXIS2_EXTERN axis2_apache2_worker_t *AXIS2_CALL
+axis2_apache2_worker_create(
+    const axis2_env_t *env, 
+    axis2_char_t *repo_path)
 {
     axis2_apache2_worker_impl_t *apache2_worker_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -72,42 +78,43 @@
         AXIS2_MALLOC (env->allocator, sizeof(axis2_apache2_worker_impl_t));
    
     if(NULL == apache2_worker_impl)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
+    }
     apache2_worker_impl->apache2_worker.ops = NULL;
     apache2_worker_impl->conf_ctx = build_conf_ctx(env, repo_path);
         
     if(NULL == apache2_worker_impl->conf_ctx)
     {
-        axis2_apache2_worker_free((axis2_apache2_worker_t*)apache2_worker_impl,
+        axis2_apache2_worker_free((axis2_apache2_worker_t *)apache2_worker_impl,
                                    env);
         return NULL;
     }
     apache2_worker_impl->apache2_worker.ops = AXIS2_MALLOC(env->allocator,
         sizeof(axis2_apache2_worker_ops_t));
     if(NULL == apache2_worker_impl->apache2_worker.ops)
-   {
-      axis2_apache2_worker_free((axis2_apache2_worker_t*)apache2_worker_impl,
+    {
+        axis2_apache2_worker_free((axis2_apache2_worker_t *)apache2_worker_impl,
                         env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
+    }
     
     apache2_worker_impl->apache2_worker.ops->process_request = 
                                     axis2_apache2_worker_process_request;
     apache2_worker_impl->apache2_worker.ops->free = axis2_apache2_worker_free;
     
-   return &(apache2_worker_impl->apache2_worker);
+    return &(apache2_worker_impl->apache2_worker);
 }
 
 axis2_status_t AXIS2_CALL
-axis2_apache2_worker_free (axis2_apache2_worker_t *apache2_worker, 
-                        const axis2_env_t *env)
+axis2_apache2_worker_free(
+    axis2_apache2_worker_t *apache2_worker, 
+    const axis2_env_t *env)
 {
     axis2_apache2_worker_impl_t *worker_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
     worker_impl = AXIS2_INTF_TO_IMPL(apache2_worker);
     if(worker_impl->conf_ctx != NULL)
@@ -121,27 +128,29 @@
     
     AXIS2_FREE(env->allocator, worker_impl->conf_ctx);
     
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
 int AXIS2_CALL 
-axis2_apache2_worker_process_request(axis2_apache2_worker_t *apache2_worker, 
-                        const axis2_env_t *env, request_rec *request)
+axis2_apache2_worker_process_request(
+    axis2_apache2_worker_t *apache2_worker, 
+    const axis2_env_t *env, 
+    request_rec *request)
 {
     axis2_apache2_worker_impl_t *apache2_worker_impl = NULL;
-   axis2_conf_ctx_t *conf_ctx = NULL;
-   axis2_msg_ctx_t *msg_ctx = NULL;
-   axis2_stream_t *request_body = NULL;
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_msg_ctx_t *msg_ctx = NULL;
+    axis2_stream_t *request_body = NULL;
     axis2_stream_t *out_stream = NULL;
-   axis2_transport_out_desc_t *out_desc = NULL;
-   axis2_transport_in_desc_t *in_desc = NULL;
-   axis2_char_t *http_version = NULL;
-   axis2_char_t *soap_action = NULL;
-   axis2_bool_t processed = AXIS2_FALSE;
-   axis2_char_t *ctx_written = NULL;
-   int content_length = -1;
-   axis2_char_t *encoding_header_value = NULL;
-   axis2_op_ctx_t *op_ctx = NULL;
+    axis2_transport_out_desc_t *out_desc = NULL;
+    axis2_transport_in_desc_t *in_desc = NULL;
+    axis2_char_t *http_version = NULL;
+    axis2_char_t *soap_action = NULL;
+    axis2_bool_t processed = AXIS2_FALSE;
+    axis2_char_t *ctx_written = NULL;
+    int content_length = -1;
+    axis2_char_t *encoding_header_value = NULL;
+    axis2_op_ctx_t *op_ctx = NULL;
     axis2_char_t *req_url = NULL;
     axis2_char_t *body_string = NULL;
     int send_status = -1;
@@ -155,22 +164,22 @@
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
     AXIS2_PARAM_CHECK(env->error, request, AXIS2_CRTICAL_FAILURE);
    
-   apache2_worker_impl = AXIS2_INTF_TO_IMPL(apache2_worker);
-   conf_ctx = apache2_worker_impl->conf_ctx;
+    apache2_worker_impl = AXIS2_INTF_TO_IMPL(apache2_worker);
+    conf_ctx = apache2_worker_impl->conf_ctx;
     url = axis2_url_create(env, "http",
-                        (axis2_char_t*)ap_get_server_name(request), 
+                        (axis2_char_t *)ap_get_server_name(request), 
                         ap_get_server_port(request), request->unparsed_uri);
-   if(NULL == conf_ctx)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_CONFIGURATION_CONTEXT,
+    if(NULL == conf_ctx)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_CONFIGURATION_CONTEXT,
                           AXIS2_FAILURE);
         return AXIS2_CRTICAL_FAILURE;
-   }
+    }
     content_length = request->remaining;
     http_version = request->protocol;
     req_url = AXIS2_URL_TO_EXTERNAL_FORM(url, env);
     
-    content_type = (axis2_char_t*)apr_table_get(request->headers_in, 
+    content_type = (axis2_char_t *)apr_table_get(request->headers_in, 
                         AXIS2_HTTP_HEADER_CONTENT_TYPE);
     request->content_type = content_type;
     if(request->read_chunked == AXIS2_TRUE && 0 == content_length)
@@ -178,30 +187,30 @@
         content_length = -1;
         request->chunked = 1;
     }
-   if(NULL == http_version)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_HTTP_VERSION, 
+    if(NULL == http_version)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_HTTP_VERSION, 
                   AXIS2_FAILURE);
         return AXIS2_CRTICAL_FAILURE;
-   }
+    }
     out_stream = axis2_stream_create_basic(env);
-   AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Client HTTP version %s", 
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Client HTTP version %s", 
                   http_version);
    
-   encoding_header_value = (axis2_char_t*)request->content_encoding;
+    encoding_header_value = (axis2_char_t*)request->content_encoding;
 
     transport_qname = axis2_qname_create(env, AXIS2_TRANSPORT_HTTP, NULL,
                         NULL);      
-   out_desc = AXIS2_CONF_GET_TRANSPORT_OUT(AXIS2_CONF_CTX_GET_CONF
+    out_desc = AXIS2_CONF_GET_TRANSPORT_OUT(AXIS2_CONF_CTX_GET_CONF
                   (apache2_worker_impl->conf_ctx, env), env, 
                         transport_qname);
-   in_desc = AXIS2_CONF_GET_TRANSPORT_IN(AXIS2_CONF_CTX_GET_CONF
+    in_desc = AXIS2_CONF_GET_TRANSPORT_IN(AXIS2_CONF_CTX_GET_CONF
                   (apache2_worker_impl->conf_ctx, env), env, 
                   transport_qname);
     AXIS2_QNAME_FREE(transport_qname, env);
 
-   msg_ctx = axis2_msg_ctx_create(env, conf_ctx, in_desc, out_desc);
-   AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
+    msg_ctx = axis2_msg_ctx_create(env, conf_ctx, in_desc, out_desc);
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
    
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
@@ -214,7 +223,7 @@
                   axis2_apache2_worker_get_headers(apache2_worker, env, 
                         simple_request), AXIS2_FALSE);*/
     ctx_uuid = axis2_uuid_gen(env);
-   AXIS2_MSG_CTX_SET_SVC_GRP_CTX_ID(msg_ctx, env, ctx_uuid);
+    AXIS2_MSG_CTX_SET_SVC_GRP_CTX_ID(msg_ctx, env, ctx_uuid);
     AXIS2_FREE(env->allocator, ctx_uuid);
     
     property = axis2_property_create(env);
@@ -227,7 +236,7 @@
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
                         property, AXIS2_FALSE);
     
-    soap_action = (axis2_char_t*)apr_table_get(request->headers_in, 
+    soap_action = (axis2_char_t *)apr_table_get(request->headers_in, 
                         AXIS2_HTTP_HEADER_SOAP_ACTION);
     request_body = axis2_stream_create_apache2(env, request);
     if(NULL == request_body)
@@ -237,48 +246,48 @@
         return AXIS2_CRTICAL_FAILURE;
     }
     if(M_GET == request->method_number)
-   {
-      processed = axis2_http_transport_utils_process_http_get_request
+    {
+        processed = axis2_http_transport_utils_process_http_get_request
                         (env, msg_ctx, request_body, out_stream,
                         content_type ,soap_action,
                   req_url,
                         conf_ctx, 
                         axis2_http_transport_utils_get_request_params(env,
-                        (axis2_char_t*)req_url));
-      if(AXIS2_FALSE == processed)
-      {
-         body_string = axis2_http_transport_utils_get_services_html(env, 
+                        (axis2_char_t *)req_url));
+       if(AXIS2_FALSE == processed)
+       {
+           body_string = axis2_http_transport_utils_get_services_html(env, 
                   conf_ctx);
             request->content_type = "text/html";
             /*axis2_apache2_worker_set_response_headers(apache2_worker, env, svr_conn,
             simple_request, response, 0);*/
             send_status = OK;         
-      }
+       }
       
-   }
+    }
     else if(M_POST == request->method_number)
-   {
+    {
         axis2_status_t status = AXIS2_FAILURE;
-      status = axis2_http_transport_utils_process_http_post_request
+        status = axis2_http_transport_utils_process_http_post_request
                         (env, msg_ctx, request_body, out_stream,
                         content_type , content_length,
                         soap_action,
-                        (axis2_char_t*)req_url);
-      if(status == AXIS2_FAILURE)
-      {
-         axis2_msg_ctx_t *fault_ctx = NULL;
-         axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
-         if(NULL == engine)
-         {
-                send_status =  HTTP_INTERNAL_SERVER_ERROR;
-         }
-         fault_ctx = AXIS2_ENGINE_CREATE_FAULT_MSG_CTX(engine, env, msg_ctx);
+                        (axis2_char_t *)req_url);
+    if(status == AXIS2_FAILURE)
+    {
+        axis2_msg_ctx_t *fault_ctx = NULL;
+        axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
+        if(NULL == engine)
+        {
+               send_status =  HTTP_INTERNAL_SERVER_ERROR;
+        }
+        fault_ctx = AXIS2_ENGINE_CREATE_FAULT_MSG_CTX(engine, env, msg_ctx);
             AXIS2_ENGINE_SEND_FAULT(engine, env, fault_ctx);
             body_string = axis2_apache2_worker_get_bytes(env, out_stream);
             send_status =  HTTP_INTERNAL_SERVER_ERROR;
             AXIS2_MSG_CTX_FREE(fault_ctx, env);
-      }
-   }
+       }
+    }
     if(-1 == send_status)
     {
         op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
@@ -330,12 +339,13 @@
     }
     AXIS2_MSG_CTX_FREE(msg_ctx, env);
     msg_ctx = NULL;
-   return send_status;
+    return send_status;
 }
 
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_apache2_worker_get_bytes(const axis2_env_t *env, 
-                        axis2_stream_t *stream)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_apache2_worker_get_bytes(
+    const axis2_env_t *env, 
+    axis2_stream_t *stream)
 {
     
     axis2_stream_t *tmp_stream = NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_out_transport_info.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_out_transport_info.h?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_out_transport_info.h (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_out_transport_info.h Wed Sep  6 02:07:02 2006
@@ -17,6 +17,11 @@
 #ifndef AXIS2_APACHE2_OUT_TRANSPORT_INFO_H
 #define AXIS2_APACHE2_OUT_TRANSPORT_INFO_H
 
+/** 
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
 /**
  * @file axis2_apache2_out_transport_info.h
  * @brief axis2 Apache2 Out Transport Info
@@ -29,14 +34,11 @@
 extern "C" 
 {
 #endif
-/** 
-  * @ingroup axis2_core_transport_http
-  * @{
-  */
 
-AXIS2_EXTERN axis2_http_out_transport_info_t * AXIS2_CALL 
-axis2_apache2_out_transport_info_create(const axis2_env_t *env,
-               request_rec *r);
+AXIS2_EXTERN axis2_http_out_transport_info_t *AXIS2_CALL 
+axis2_apache2_out_transport_info_create(
+    const axis2_env_t *env,
+    request_rec *r);
 
 /**
  * Free http_out_transport_info passed as void pointer. This will be
@@ -44,8 +46,9 @@
  * into the http_out_transport_info structure's free method
  */
 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_apache2_out_transport_info_free_void_arg (void *transport_info,
-                                             const axis2_env_t *env);
+axis2_apache2_out_transport_info_free_void_arg(
+    void *transport_info,
+    const axis2_env_t *env);
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_worker.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_worker.h?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_worker.h (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/axis2_apache2_worker.h Wed Sep  6 02:07:02 2006
@@ -17,6 +17,15 @@
 #ifndef AXIS2_APACHE2_WORKER_H
 #define AXIS2_APACHE2_WORKER_H
 
+/**
+ * @brief Apache2 Worker ops struct
+ * Encapsulator struct for ops of axis2_apache2_worker
+ */
+
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
 
 /**
   * @file axis2_apache2_worker.h
@@ -35,42 +44,40 @@
 {
 #endif
 
-/**
- * @ingroup axis2_core_transport_http
- * @{
- */
 
     typedef struct axis2_apache2_worker_ops axis2_apache2_worker_ops_t;
-    typedef struct axis2_apache2_worker axis2_apache2_worker_t; 
-    
-/** 
- * @brief Apache2 Worker ops struct
- * Encapsulator struct for ops of axis2_apache2_worker
- */  
-AXIS2_DECLARE_DATA struct axis2_apache2_worker_ops
-{
-    int (AXIS2_CALL *process_request)
-                    (axis2_apache2_worker_t *apache2_worker, 
-                     const axis2_env_t *env, request_rec *r);
-    
-    axis2_status_t (AXIS2_CALL *free)
-                    (axis2_apache2_worker_t *apache2_worker, 
-                    const axis2_env_t *env);
-};
+    typedef struct axis2_apache2_worker axis2_apache2_worker_t;
 
-/** 
- * @brief Apache2 Worker struct
-  *    Axis2 Apache2 Worker
- */
-AXIS2_DECLARE_DATA struct axis2_apache2_worker
-{
-    axis2_apache2_worker_ops_t *ops;    
-};
 
+    struct axis2_apache2_worker_ops
+    {
+        int (AXIS2_CALL *
+                process_request)(
+                    axis2_apache2_worker_t *apache2_worker,
+                    const axis2_env_t *env, 
+                    request_rec *r);
+
+        axis2_status_t (AXIS2_CALL *
+                free)(
+                    axis2_apache2_worker_t *apache2_worker,
+                    const axis2_env_t *env);
+    };
+
+    /**
+     * @brief Apache2 Worker struct
+      *    Axis2 Apache2 Worker
+     */
+    struct axis2_apache2_worker
+    {
+        axis2_apache2_worker_ops_t *ops;
+    };
+
+
+    AXIS2_EXTERN axis2_apache2_worker_t * AXIS2_CALL
+    axis2_apache2_worker_create(
+        const axis2_env_t *env, 
+        axis2_char_t *repo_path);
 
-AXIS2_EXTERN axis2_apache2_worker_t * AXIS2_CALL 
-axis2_apache2_worker_create (const axis2_env_t *env, axis2_char_t *repo_path);
-    
 /************************** Start of function macros **************************/
 #define AXIS2_APACHE2_WORKER_PROCESS_REQUEST(apache2_worker, env, request) \
                         ((apache2_worker)->ops->process_request(\
@@ -78,7 +85,7 @@
 #define AXIS2_APACHE2_WORKER_FREE(apache2_worker, env) \
                 ((apache2_worker)->ops->free(apache2_worker, env))
 
-/************************** End of function macros ****************************/    
+/************************** End of function macros ****************************/
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/mod_axis2.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/mod_axis2.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/mod_axis2.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/mod_axis2.c Wed Sep  6 02:07:02 2006
@@ -32,22 +32,49 @@
     char * axis2_log_file;
     char * axis2_repo_path;
     axis2_log_levels_t log_level;
-}axis2_config_rec_t;
+}
+axis2_config_rec_t;
 
 axis2_apache2_worker_t *axis2_worker = NULL;
 const axis2_env_t *axis2_env = NULL;
 
 /******************************Function Headers********************************/
-static void * axis2_create_svr(apr_pool_t *p, server_rec *s);
-static const char *axis2_set_repo_path(cmd_parms *cmd, void *dummy, 
-                        const char *arg);
-static const char *axis2_set_log_file(cmd_parms *cmd, void *dummy, 
-                        const char *arg);
-static const char *axis2_set_log_level(cmd_parms *cmd, void *dummy, 
-                        const char *arg);
-static int axis2_handler(request_rec *req);
-static void axis2_module_init(apr_pool_t* p, server_rec* svr_rec);
-static void axis2_register_hooks(apr_pool_t *p);
+static void * 
+axis2_create_svr(
+    apr_pool_t *p, 
+    server_rec *s);
+
+static const char *
+axis2_set_repo_path(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg);
+
+static const char *
+axis2_set_log_file(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg);
+
+static const char *
+axis2_set_log_level(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg);
+
+static int 
+axis2_handler(
+    request_rec *req);
+
+static void 
+axis2_module_init(
+    apr_pool_t* p, 
+    server_rec* svr_rec);
+
+static void 
+axis2_register_hooks(
+    apr_pool_t *p);
+
 /***************************End of Function Headers****************************/
 
 static const command_rec axis2_cmds[] = 
@@ -72,7 +99,10 @@
     axis2_register_hooks   /* register hooks                      */
 };
 
-static void * axis2_create_svr(apr_pool_t *p, server_rec *s)
+static void * 
+axis2_create_svr(
+    apr_pool_t *p, 
+    server_rec *s)
 {
     axis2_config_rec_t *conf = apr_palloc(p, sizeof(*conf));
     conf->axis2_log_file = NULL;
@@ -84,8 +114,11 @@
     return conf;
 }
 
-static const char *axis2_set_repo_path(cmd_parms *cmd, void *dummy, 
-                        const char *arg)
+static const char *
+axis2_set_repo_path(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg)
 {
     axis2_config_rec_t *conf = (axis2_config_rec_t*)ap_get_module_config(
                         cmd->server->module_config, &axis2_module);
@@ -93,8 +126,11 @@
     return NULL;
 }
 
-static const char *axis2_set_log_file(cmd_parms *cmd, void *dummy, 
-                                     const char *arg)
+static const char *
+axis2_set_log_file(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg)
 {
     axis2_config_rec_t *conf = (axis2_config_rec_t*)ap_get_module_config(
             cmd->server->module_config, &axis2_module);
@@ -102,8 +138,11 @@
     return NULL;
 }
 
-static const char *axis2_set_log_level(cmd_parms *cmd, void *dummy, 
-                        const char *arg)
+static const char *
+axis2_set_log_level(
+    cmd_parms *cmd, 
+    void *dummy, 
+    const char *arg)
 {
     axis2_log_levels_t level = AXIS2_LOG_LEVEL_DEBUG;
     axis2_config_rec_t *conf = (axis2_config_rec_t*)ap_get_module_config(
@@ -141,7 +180,9 @@
 }
 
 /* The sample content handler */
-static int axis2_handler(request_rec *req)
+static int 
+axis2_handler(
+    request_rec *req)
 {
     int rv = 0;
     if (strcmp(req->handler, "axis2_module")) {
@@ -162,7 +203,10 @@
     return rv;
 }
 
-static void axis2_module_init(apr_pool_t* p, server_rec* svr_rec)
+static void 
+axis2_module_init(
+    apr_pool_t* p, 
+    server_rec* svr_rec)
 {
     axis2_allocator_t *allocator = NULL;
     axis2_error_t *error = NULL;
@@ -232,7 +276,9 @@
     }
 }
 
-static void axis2_register_hooks(apr_pool_t *p)
+static void 
+axis2_register_hooks(
+    apr_pool_t *p)
 {
     ap_hook_handler(axis2_handler, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init(axis2_module_init, NULL, NULL, APR_HOOK_REALLY_FIRST);

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c?view=diff&rev=440661&r1=440660&r2=440661
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/simple_axis2_server/http_server_main.c Wed Sep  6 02:07:02 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include <axis2_http_server.h>
 #include <axis2_http_transport.h>
 #include <platforms/axis2_platform_auto_sense.h>
@@ -30,141 +30,158 @@
 axis2_env_t *system_env = NULL;
 axis2_transport_receiver_t *server = NULL;
 /***************************** Function headers *******************************/
-axis2_env_t* init_syetem_env(axis2_allocator_t *allocator, 
+axis2_env_t * 
+init_syetem_env(
+    axis2_allocator_t *allocator,
     const axis2_char_t *log_file);
-void system_exit(axis2_env_t *env, int status);
-void usage(axis2_char_t* prog_name);
-void sig_handler(int signal);
+
+void system_exit(
+    axis2_env_t *env, 
+    int status);
+
+void usage(
+    axis2_char_t *prog_name);
+
+void sig_handler(
+    int signal);
+
 /***************************** End of function headers ************************/
-axis2_env_t* init_syetem_env(axis2_allocator_t *allocator, 
+axis2_env_t * 
+init_syetem_env(
+    axis2_allocator_t *allocator,
     const axis2_char_t *log_file)
 {
-   axis2_error_t *error = axis2_error_create(allocator);
-   axis2_log_t *log = axis2_log_create(allocator, NULL, log_file);
-   axis2_thread_pool_t *thread_pool = axis2_thread_pool_init(allocator);
-    /* We need to init the parser in main thread before spawning child 
+    axis2_error_t *error = axis2_error_create(allocator);
+    axis2_log_t *log = axis2_log_create(allocator, NULL, log_file);
+    axis2_thread_pool_t *thread_pool = axis2_thread_pool_init(allocator);
+    /* We need to init the parser in main thread before spawning child
      * threads
      */
-    axiom_xml_reader_init(); 
-   return axis2_env_create_with_error_log_thread_pool(allocator, error, log, 
-                  thread_pool);
+    axiom_xml_reader_init();
+    return axis2_env_create_with_error_log_thread_pool(allocator, error, log,
+            thread_pool);
 }
 
-void system_exit(axis2_env_t *env, int status)
+void system_exit(
+    axis2_env_t *env, 
+    int status)
 {
     axis2_allocator_t *allocator = NULL;
     if(NULL != server)
     {
-       AXIS2_TRANSPORT_RECEIVER_FREE(server,  system_env);
+        AXIS2_TRANSPORT_RECEIVER_FREE(server,  system_env);
     }
-   if(NULL != env)
-   {
+    if(NULL != env)
+    {
         allocator = env->allocator;
-      axis2_env_free(env);
-   }
+        axis2_env_free(env);
+    }
     axis2_allocator_free(allocator);
     axiom_xml_reader_cleanup();
-   _exit(status);
+    _exit(status);
 }
 
-int main(int argc, char *argv[])
+int main(
+    int argc, 
+    char *argv[])
 {
-   axis2_allocator_t *allocator = NULL;
-   axis2_env_t *env = NULL;
-   extern char *optarg;
-   extern int optopt;
-   int c;
-   axis2_log_levels_t log_level = AXIS2_LOG_LEVEL_DEBUG;
-   const axis2_char_t *log_file = "axis2.log";
-   int port = 9090;
-   const axis2_char_t *repo_path = "../";
-   
-   axis2_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
+    axis2_allocator_t *allocator = NULL;
+    axis2_env_t *env = NULL;
+    extern char *optarg;
+    extern int optopt;
+    int c;
+    axis2_log_levels_t log_level = AXIS2_LOG_LEVEL_DEBUG;
+    const axis2_char_t *log_file = "axis2.log";
+    int port = 9090;
+    const axis2_char_t *repo_path = "../";
+
+    axis2_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
 
     while ((c = AXIS2_GETOPT(argc, argv, ":p:r:ht:l:f:")) != -1)
     {
-        
+
         switch(c)
         {
-            case 'p':
-                port = AXIS2_ATOI(optarg);
-                break;
-            case 'r':
-                repo_path = optarg;
-                break;
-            case 't':
-                axis2_http_socket_read_timeout = AXIS2_ATOI(optarg) * 1000;
-                break;
-            case 'l':
-                log_level = AXIS2_ATOI(optarg);
-                if (log_level < AXIS2_LOG_LEVEL_CRITICAL)
-                    log_level = AXIS2_LOG_LEVEL_CRITICAL;
-                if (log_level > AXIS2_LOG_LEVEL_TRACE)
-                    log_level = AXIS2_LOG_LEVEL_TRACE;
-                break;
-            case 'f':
-                log_file = optarg;
-                break;
-            case 'h':
-                usage(argv[0]);
-                return 0;
-            case ':':
-                fprintf(stderr, "\nOption -%c requires an operand\n", optopt);
-                usage(argv[0]);
-               return -1;
-           case '?':
-               if (isprint (optopt))
-               fprintf (stderr, "\nUnknown option `-%c'.\n", optopt);
-               usage(argv[0]);
-               return -1;
-       }
-   }
-
-   allocator = axis2_allocator_init(NULL);
-    
-   if(NULL == allocator)
-   {
-      printf("[Axis2]Startup FAILED due to memory allocation failure\n");
-      system_exit(NULL, -1);
-   }
-   
+        case 'p':
+            port = AXIS2_ATOI(optarg);
+            break;
+        case 'r':
+            repo_path = optarg;
+            break;
+        case 't':
+            axis2_http_socket_read_timeout = AXIS2_ATOI(optarg) * 1000;
+            break;
+        case 'l':
+            log_level = AXIS2_ATOI(optarg);
+            if (log_level < AXIS2_LOG_LEVEL_CRITICAL)
+                log_level = AXIS2_LOG_LEVEL_CRITICAL;
+            if (log_level > AXIS2_LOG_LEVEL_TRACE)
+                log_level = AXIS2_LOG_LEVEL_TRACE;
+            break;
+        case 'f':
+            log_file = optarg;
+            break;
+        case 'h':
+            usage(argv[0]);
+            return 0;
+        case ':':
+            fprintf(stderr, "\nOption -%c requires an operand\n", optopt);
+            usage(argv[0]);
+            return -1;
+        case '?':
+            if (isprint (optopt))
+                fprintf (stderr, "\nUnknown option `-%c'.\n", optopt);
+            usage(argv[0]);
+            return -1;
+        }
+    }
+
+    allocator = axis2_allocator_init(NULL);
+
+    if(NULL == allocator)
+    {
+        printf("[Axis2]Startup FAILED due to memory allocation failure\n");
+        system_exit(NULL, -1);
+    }
+
     env = init_syetem_env(allocator, log_file);
     env->log->level = log_level;
-   
+
     axis2_error_init();
-   system_env = env;
-   
+    system_env = env;
+
 #ifndef WIN32
     signal(SIGINT, sig_handler);
-   signal(SIGPIPE, sig_handler); 
-#endif   
+    signal(SIGPIPE, sig_handler);
+#endif
+
+    AXIS2_LOG_INFO(env->log, "Starting Axis2 HTTP server....");
+    AXIS2_LOG_INFO(env->log, "Server port : %d", port);
+    AXIS2_LOG_INFO(env->log, "Repo location : %s", repo_path);
+    AXIS2_LOG_INFO(env->log, "Read Timeout : %d ms", axis2_http_socket_read_timeout);
+
+    server = axis2_http_server_create(env, repo_path, port);
+    if(NULL == server)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Server creation failed: Error code:"
+                " %d :: %s", env->error->error_number,
+                AXIS2_ERROR_GET_MESSAGE(env->error));
+        system_exit(env, -1);
 
-   AXIS2_LOG_INFO(env->log, "Starting Axis2 HTTP server....");
-   AXIS2_LOG_INFO(env->log, "Server port : %d", port);
-   AXIS2_LOG_INFO(env->log, "Repo location : %s", repo_path);
-   AXIS2_LOG_INFO(env->log, "Read Timeout : %d ms", axis2_http_socket_read_timeout);
-   
-   server = axis2_http_server_create(env, repo_path, port);
-   if(NULL == server)
-   {
-       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Server creation failed: Error code:"
-                  " %d :: %s", env->error->error_number,
-                        AXIS2_ERROR_GET_MESSAGE(env->error));
-      system_exit(env, -1);
-      
-   }
-   printf("Started Simple Axis2 HTTP Server ...\n");
-   if(AXIS2_TRANSPORT_RECEIVER_START(server, env) == AXIS2_FAILURE)
-   {
-      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Server start failed: Error code:"
-                  " %d :: %s", env->error->error_number,
-                        AXIS2_ERROR_GET_MESSAGE(env->error));
-      system_exit(env, -1);
-   }
-   return 0;
+    }
+    printf("Started Simple Axis2 HTTP Server ...\n");
+    if(AXIS2_TRANSPORT_RECEIVER_START(server, env) == AXIS2_FAILURE)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Server start failed: Error code:"
+                " %d :: %s", env->error->error_number,
+                AXIS2_ERROR_GET_MESSAGE(env->error));
+        system_exit(env, -1);
+    }
+    return 0;
 }
 
-void usage(axis2_char_t* prog_name)
+void usage(
+    axis2_char_t *prog_name)
 {
     fprintf(stdout, "\n Usage : %s", prog_name );
     fprintf(stdout, " [-p PORT]");
@@ -174,14 +191,14 @@
     fprintf(stdout, " [-f LOG_FILE]\n");
     fprintf(stdout, " Options :\n");
     fprintf(stdout, "\t-p PORT \t use the port number PORT. The default port is"
-                  " 9090\n");
+            " 9090\n");
     fprintf(stdout, "\t-r REPO_PATH \t use the repository path REPO_PATH. The"
-                  " default repository path is ../\n");
+            " default repository path is ../\n");
     fprintf(stdout, "\t-t SOCKET_READ_TIMEOUT\t set socket read timeout to "
-                  "SOCKET_READ_TIMEOUT. Default timeout is 30 seconds\n");
+            "SOCKET_READ_TIMEOUT. Default timeout is 30 seconds\n");
     fprintf(stdout, "\t-l LOG_LEVEL\t set log level to LOG_LEVEL. Available "
-                  "log levels range from 0(critical only) to 4(debug)."
-                  "\n\t\t\t Default log level is 4(debug).\n");
+            "log levels range from 0(critical only) to 4(debug)."
+            "\n\t\t\t Default log level is 4(debug).\n");
     fprintf(stdout, "\t-f LOG_FILE\t set log file to LOG_FILE. Default is /dev/stderr\n");
     fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
 }
@@ -190,30 +207,31 @@
  * Signal handler
  */
 #ifndef WIN32
- 
-void sig_handler(int signal)
+
+void sig_handler(
+    int signal)
 {
-   switch(signal)
-   {
-      case SIGINT : 
-      {
-         AXIS2_LOG_INFO(system_env->log, "Received signal SIGINT. Server "
-                  "shutting down");
-         axis2_http_server_stop(server, system_env);
-         AXIS2_LOG_INFO(system_env->log, "Shutdown complete ...");
-         system_exit(system_env, 0);         
-      }
-      case SIGPIPE :
-      {
-         AXIS2_LOG_INFO(system_env->log, "Received signal SIGPIPE.  Client "
-                  "request serve aborted");
-         return;
-      }
-      case SIGSEGV :
-      {
-         fprintf(stderr, "Received deadly signal SIGSEGV. Terminating\n");
-         _exit(-1);
-      }
-   }
+    switch(signal)
+    {
+    case SIGINT :
+    {
+        AXIS2_LOG_INFO(system_env->log, "Received signal SIGINT. Server "
+                "shutting down");
+        axis2_http_server_stop(server, system_env);
+        AXIS2_LOG_INFO(system_env->log, "Shutdown complete ...");
+        system_exit(system_env, 0);
+    }
+    case SIGPIPE :
+    {
+        AXIS2_LOG_INFO(system_env->log, "Received signal SIGPIPE.  Client "
+                "request serve aborted");
+        return;
+    }
+    case SIGSEGV :
+    {
+        fprintf(stderr, "Received deadly signal SIGSEGV. Terminating\n");
+        _exit(-1);
+    }
+    }
 }
 #endif



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