axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r509061 - in /webservices/axis2/trunk/c: include/ modules/core/context/ modules/core/transport/http/common/ modules/core/transport/http/sender/ modules/core/transport/http/server/IIS/ modules/core/transport/http/server/apache2/ modules/core...
Date Mon, 19 Feb 2007 02:25:25 GMT
Author: samisa
Date: Sun Feb 18 18:25:24 2007
New Revision: 509061

URL: http://svn.apache.org/viewvc?view=rev&rev=509061
Log:
Removed some more uses of hash table

Modified:
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/include/axis2_op_ctx.h
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/context/op_ctx.c
    webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c

Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Sun Feb 18 18:25:24 2007
@@ -307,16 +307,6 @@
         const axis2_env_t *env);
 
     /**
-     * Checks the response status, whether it is written or not.
-     * @param msg_ctx message context
-     * @param env pointer to environment struct
-     * @return AXIS2_TRUE if response is already written, else AXIS2_FALSE         
-     */
-    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-    axis2_msg_ctx_get_response_written(const axis2_msg_ctx_t *msg_ctx,
-        const axis2_env_t *env);
-
-    /**
      * Checks if it is on the server side that the message is being dealt 
      * with, or on the client side.
      * @param msg_ctx message context
@@ -468,19 +458,6 @@
         axis2_endpoint_ref_t *referance);
 
     /**
-     * Sets the bool value indicating the status of response.
-     * @param msg_ctx message context
-     * @param env pointer to environment struct
-     * @param response_written AXIS2_TRUE if response is written, else 
-     * AXIS2_FALSE
-     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-     */
-    AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axis2_msg_ctx_set_response_written(axis2_msg_ctx_t *msg_ctx,
-        const axis2_env_t *env,
-        const axis2_bool_t response_written);
-
-    /**
      * Sets the bool value indicating if it is the server side or the
      * client side.
      * @param msg_ctx message context
@@ -1418,6 +1395,33 @@
     axis2_msg_ctx_reset_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
         const axis2_env_t *env);
 
+    AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+    axis2_msg_ctx_get_transport_headers(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_msg_ctx_set_transport_headers(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env,
+        axis2_hash_t *transport_headers);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_msg_ctx_get_transfer_encoding(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_msg_ctx_set_transfer_encoding(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env,
+        axis2_char_t *str);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_msg_ctx_get_transport_url(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_msg_ctx_set_transport_url(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env,
+        axis2_char_t *str);
+
 /** Gets base context struct. */
 #define AXIS2_MSG_CTX_GET_BASE(msg_ctx, env) \
       axis2_msg_ctx_get_base(msg_ctx, env)
@@ -1481,10 +1485,6 @@
 #define AXIS2_MSG_CTX_GET_REPLY_TO(msg_ctx, env) \
       axis2_msg_ctx_get_reply_to(msg_ctx, env)
 
-/** Gets bool value indicating response written status. */
-#define AXIS2_MSG_CTX_GET_RESPONSE_WRITTEN(msg_ctx, env) \
-      axis2_msg_ctx_get_response_written(msg_ctx, env)
-
 /** Gets bool value indicating whether the invocation is happening on server 
     side or client side. */
 #define AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env) \
@@ -1534,10 +1534,6 @@
 #define AXIS2_MSG_CTX_SET_REPLY_TO(msg_ctx, env, reference) \
       axis2_msg_ctx_set_reply_to(msg_ctx, env, reference)
 
-/** Sets bool value indicating response written status. */
-#define AXIS2_MSG_CTX_SET_RESPONSE_WRITTEN(msg_ctx, env, response_written) \
-      axis2_msg_ctx_set_response_written(msg_ctx, env, response_written)
-
 /** Sets bool value indicating whether the invocation is happening on server 
     side or client side. */
 #define AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, server_side) \
@@ -1546,14 +1542,6 @@
 /** Sets WS-Addressing to address. */
 #define AXIS2_MSG_CTX_SET_TO(msg_ctx, env, reference) \
       axis2_msg_ctx_set_to(msg_ctx, env, reference)
-
-/** Gets bool value indicating if a new thread required in invocation. */
-#define AXIS2_MSG_CTX_GET_NEW_THREAD_REQUIRED(msg_ctx, env) \
-      axis2_msg_ctx_set_response_written(msg_ctx, env)
-
-/** Sets bool value indicating if a new thread required in invocation. */
-#define AXIS2_MSG_CTX_SET_NEW_THREAD_REQUIRED(msg_ctx, env, new_thread_required) \
-      axis2_msg_ctx_set_response_written(msg_ctx, env, new_thread_required)
 
 /** Sets WS-Addressing action. */
 #define AXIS2_MSG_CTX_SET_WSA_ACTION(msg_ctx, env, action_uri) \

Modified: webservices/axis2/trunk/c/include/axis2_op_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op_ctx.h?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op_ctx.h Sun Feb 18 18:25:24 2007
@@ -205,6 +205,31 @@
     axis2_op_ctx_get_msg_ctx_map(const axis2_op_ctx_t *op_ctx,
         const axis2_env_t *env);
 
+    /**
+     * Sets the bool value indicating the status of response.
+     * @param msg_ctx message context
+     * @param env pointer to environment struct
+     * @param response_written AXIS2_TRUE if response is written, else 
+     * AXIS2_FALSE
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_op_ctx_set_response_written(axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env,
+        const axis2_bool_t response_written);
+
+
+    /**
+     * Checks the response status, whether it is written or not.
+     * @param msg_ctx message context
+     * @param env pointer to environment struct
+     * @return AXIS2_TRUE if response is already written, else AXIS2_FALSE         
+     */
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_op_ctx_get_response_written(const axis2_op_ctx_t *op_ctx,
+        const axis2_env_t *env);
+
+
 /** Gets base context struct. */
 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
       axis2_op_ctx_get_base(op_ctx, env)

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Sun Feb 18 18:25:24 2007
@@ -66,8 +66,6 @@
     axiom_soap_envelope_t *response_soap_envelope;
     /** SOAP Fault envelope */
     axiom_soap_envelope_t *fault_soap_envelope;
-    /** response written? */
-    axis2_bool_t response_written;
     /** in fault flow? */
     axis2_bool_t in_fault_flow;
     /** is this server side? */
@@ -148,6 +146,9 @@
     axis2_string_t *charset_encoding;
     axis2_stream_t *transport_out_stream;
     axis2_http_out_transport_info_t *http_out_transport_info;
+    axis2_hash_t *transport_headers;
+    axis2_char_t *transfer_encoding;
+    axis2_char_t *transport_url;
 };
 
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
@@ -182,7 +183,6 @@
     msg_ctx->transport_out_desc = NULL;
     msg_ctx->soap_envelope = NULL;
     msg_ctx->fault_soap_envelope = NULL;
-    msg_ctx->response_written = AXIS2_FALSE;
     msg_ctx->in_fault_flow = AXIS2_FALSE;
     msg_ctx->server_side = AXIS2_FALSE;
     msg_ctx->message_id = NULL;
@@ -213,6 +213,9 @@
     msg_ctx->charset_encoding = NULL;
     msg_ctx->transport_out_stream = NULL;
     msg_ctx->http_out_transport_info = NULL;
+    msg_ctx->transport_headers = NULL;
+    msg_ctx->transfer_encoding = NULL;
+    msg_ctx->transport_url = NULL;
 
     msg_ctx->base = axis2_ctx_create(env);
     if (!(msg_ctx->base))
@@ -349,7 +352,6 @@
     if (msg_ctx->charset_encoding)
     {
         axis2_string_free(msg_ctx->charset_encoding, env);
-        msg_ctx->charset_encoding = NULL;
     }
     
     if (msg_ctx->transport_out_stream)
@@ -362,6 +364,16 @@
         AXIS2_HTTP_OUT_TRANSPORT_INFO_FREE(msg_ctx->http_out_transport_info, env);
     }
         
+    if (msg_ctx->transport_headers)
+    {
+        axis2_hash_free(msg_ctx->transport_headers, env);
+    }
+        
+    if (msg_ctx->transfer_encoding)
+    {
+        AXIS2_FREE(env->allocator, msg_ctx->transfer_encoding);
+    }
+    
     AXIS2_FREE(env->allocator, msg_ctx);
     msg_ctx = NULL;
 
@@ -548,15 +560,6 @@
 }
 
 axis2_bool_t AXIS2_CALL
-axis2_msg_ctx_get_response_written(
-    const axis2_msg_ctx_t *msg_ctx,
-    const axis2_env_t *env)
-{
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return msg_ctx->response_written;
-}
-
-axis2_bool_t AXIS2_CALL
 axis2_msg_ctx_get_server_side(
     const axis2_msg_ctx_t *msg_ctx,
     const axis2_env_t *env)
@@ -748,17 +751,6 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_msg_ctx_set_response_written(
-    struct axis2_msg_ctx *msg_ctx,
-    const axis2_env_t *env,
-    axis2_bool_t response_written)
-{
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    msg_ctx->response_written  = response_written ;
-    return  AXIS2_SUCCESS;
-}
-
-axis2_status_t AXIS2_CALL
 axis2_msg_ctx_set_server_side(
     struct axis2_msg_ctx *msg_ctx,
     const axis2_env_t *env,
@@ -2098,4 +2090,105 @@
 
     return AXIS2_SUCCESS;
 }
+   
+AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+axis2_msg_ctx_get_transport_headers(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{
+    if (msg_ctx)
+    {
+        return msg_ctx->transport_headers;
+    }
+    else
+    {
+        return NULL;
+    }
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_transport_headers(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env,
+    axis2_hash_t *transport_headers)
+{
+    if (msg_ctx)
+    {
+        if (msg_ctx->transport_headers)
+        {
+            axis2_hash_free(msg_ctx->transport_headers, env); 
+        }
+        
+        msg_ctx->transport_headers = transport_headers;
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
     
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_msg_ctx_get_transfer_encoding(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{    
+    if (msg_ctx)
+        return msg_ctx->transfer_encoding;
+    else
+        return NULL;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_transfer_encoding(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env,
+    axis2_char_t *str)
+{    
+    if (msg_ctx)
+    {
+        if (msg_ctx->transfer_encoding)
+        {
+            AXIS2_FREE(env->allocator, msg_ctx->transfer_encoding);
+            msg_ctx->transfer_encoding = NULL;
+        }
+        if (str)
+        {
+            msg_ctx->transfer_encoding = str;
+        }
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_msg_ctx_get_transport_url(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{    
+    if (msg_ctx)
+        return msg_ctx->transport_url;
+    else
+        return NULL;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_transport_url(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env,
+    axis2_char_t *str)
+{    
+    if (msg_ctx)
+    {
+        /* this is a shallow copy, no need to free */
+        msg_ctx->transport_url = str;
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+

Modified: webservices/axis2/trunk/c/modules/core/context/op_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/op_ctx.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/op_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/op_ctx.c Sun Feb 18 18:25:24 2007
@@ -48,6 +48,7 @@
     axis2_qname_t *svc_qname;
     /* mutex to synchronize the read/write operations */
     axis2_thread_mutex_t *mutex;
+    axis2_bool_t response_written;
 };
 
 AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
@@ -75,6 +76,7 @@
     op_ctx->op_ctx_map = NULL;
     op_ctx->op_qname = NULL;
     op_ctx->svc_qname = NULL;
+    op_ctx->response_written = AXIS2_FALSE;
     op_ctx->mutex = axis2_thread_mutex_create(env->allocator,
             AXIS2_THREAD_MUTEX_DEFAULT);
 
@@ -350,3 +352,32 @@
     AXIS2_ENV_CHECK(env, NULL);
     return (axis2_msg_ctx_t **)(op_ctx->msg_ctx_array);
 }
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_op_ctx_get_response_written(const axis2_op_ctx_t *op_ctx,
+    const axis2_env_t *env)
+{
+    if (op_ctx)
+        return op_ctx->response_written;
+    else
+        return AXIS2_FAILURE;
+
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_op_ctx_set_response_written(axis2_op_ctx_t *op_ctx,
+    const axis2_env_t *env,
+    const axis2_bool_t written)
+{
+    if (op_ctx)
+    {
+        op_ctx->response_written = written;
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+ 
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/common/http_worker.c Sun Feb 18
18:25:24 2007
@@ -163,7 +163,6 @@
     axis2_char_t *soap_action = NULL;
     axis2_string_t *soap_action_str = NULL;
     axis2_bool_t processed = AXIS2_FALSE;
-    axis2_char_t *ctx_written = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     int content_length = -1;
     axis2_http_header_t *encoding_header = NULL;
@@ -173,7 +172,6 @@
     axis2_url_t *request_url = NULL;
     axis2_http_out_transport_info_t *http_out_transport_info = NULL;
     axis2_hash_t *headers = NULL;
-    axis2_property_t *property = NULL;
     axis2_char_t *url_external_form = NULL;
     axis2_char_t *svc_grp_uuid = NULL;
     axis2_char_t *path = NULL;
@@ -264,13 +262,8 @@
     
     axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
 
-    property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
-    AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_hash_free_void_arg);
     headers = axis2_http_worker_get_headers(http_worker, env, simple_request);
-    AXIS2_PROPERTY_SET_VALUE(property, env, headers);
-    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS, property,
-            AXIS2_FALSE);
+    axis2_msg_ctx_set_transport_headers(msg_ctx, env, headers);
 
     svc_grp_uuid = axis2_uuid_gen(env);
     if (svc_grp_uuid)
@@ -385,20 +378,9 @@
 
         }
     }
+
     op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-    if (op_ctx)
-    {
-        axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(
-                    msg_ctx, env), env);
-        if (ctx)
-        {
-            property = AXIS2_CTX_GET_PROPERTY(ctx, env,
-                    AXIS2_RESPONSE_WRITTEN, AXIS2_FALSE);
-            if (property)
-                ctx_written = AXIS2_PROPERTY_GET_VALUE(property, env);
-        }
-    }
-    if (ctx_written && AXIS2_STRCASECMP(ctx_written, "TRUE") == 0)
+    if (axis2_op_ctx_get_response_written(op_ctx, env))
     {
         AXIS2_HTTP_SIMPLE_RESPONSE_SET_STATUS_LINE(response, env, http_version,
                 AXIS2_HTTP_RESPONSE_OK_CODE_VAL, "OK");
@@ -420,6 +402,7 @@
        operation context that holds it
     AXIS2_MSG_CTX_FREE(msg_ctx, env); */
     /* Free message contextx */
+    op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
     if (op_ctx) 
     {
         axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Sun
Feb 18 18:25:24 2007
@@ -224,14 +224,8 @@
     /*AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx,
                       env, axis2_http_transport_utils_is_doing_rest(env, 
                       msg_ctx));*/
-    property = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
-            AXIS2_TRANSPORT_URL, AXIS2_FALSE);
-    if (property)
-    {
-        transport_url = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(property, env);
-        printf("transport_url:%s\n", transport_url);
-        property = NULL;
-    }
+
+    transport_url = axis2_msg_ctx_get_transport_url(msg_ctx, env);
     if (transport_url)
     {
         epr = axis2_endpoint_ref_create(env, transport_url);
@@ -294,10 +288,9 @@
         
         if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))
         {
-            axis2_op_ctx_t *op_ctx = NULL;
-            axis2_ctx_t *ctx = NULL;
             axis2_http_out_transport_info_t *out_info = NULL;
             axis2_bool_t is_soap11 = AXIS2_FALSE;
+            axis2_op_ctx_t *op_ctx = NULL; 
 
             out_info = axis2_msg_ctx_get_http_out_transport_info(msg_ctx, env);
 
@@ -399,22 +392,7 @@
             /*AXIS2_FREE(env->allocator, buffer);*/
 
             op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-            if (op_ctx)
-            {
-                ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
-                if (ctx)
-                {
-                    axis2_char_t *value = NULL;
-
-                    value = AXIS2_STRDUP("TRUE", env);
-                    property = axis2_property_create(env);
-                    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
-                    AXIS2_PROPERTY_SET_VALUE(property, env, value);
-                    AXIS2_CTX_SET_PROPERTY(ctx, env, AXIS2_RESPONSE_WRITTEN,
-                            property, AXIS2_FALSE);
-                }
-            }
-
+            axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
         }
     }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c Sun
Feb 18 18:25:24 2007
@@ -167,7 +167,6 @@
     axis2_bool_t processed = AXIS2_FALSE;
     axis2_char_t *ctx_written = NULL;
     //int content_length = -1;
-    axis2_op_ctx_t *op_ctx = NULL;
     //axis2_char_t *req_url = NULL;
     axis2_char_t *body_string = NULL;
     int send_status = -1;
@@ -324,23 +323,8 @@
 	// Nothing wrong has happen. So proceed with the request
     if (-1 == send_status)
     {
-        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-        if (op_ctx)
-        {
-            axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(
-                        msg_ctx, env), env);
-            if (ctx)
-            {
-                property = AXIS2_CTX_GET_PROPERTY(ctx, env,
-                        AXIS2_RESPONSE_WRITTEN, AXIS2_FALSE);
-                if (property)
-                {
-                    ctx_written = AXIS2_PROPERTY_GET_VALUE(property, env);
-                    property = NULL;
-                }
-            }
-        }
-        if (ctx_written && AXIS2_STRCASECMP(ctx_written, "TRUE") == 0)
+        axis2_op_ctx_t *op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+        if (axis2_op_ctx_get_response_written(op_ctx, env))
         {
             if (out_stream)
             {

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=509061&r1=509060&r2=509061
==============================================================================
--- 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
Sun Feb 18 18:25:24 2007
@@ -148,17 +148,13 @@
     axis2_char_t *http_version = NULL;
     axis2_string_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;
     unsigned int body_string_len = 0;
     int send_status = -1;
     axis2_char_t *content_type = NULL;
-    axis2_property_t *property = NULL;
-    /*axis2_url_t *url = NULL;*/
     axis2_http_out_transport_info_t *apache2_out_transport_info = NULL;
     axis2_char_t *ctx_uuid = NULL;
 
@@ -213,9 +209,9 @@
 
     axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
 
-    /*AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS,
+    /*axis2_msg_ctx_set_transport_headers(msg_ctx, env, 
                    axis2_apache2_worker_get_headers(apache2_worker, env, 
-                         simple_request), AXIS2_FALSE);*/
+                         simple_request));*/
     ctx_uuid = axis2_uuid_gen(env);
     if (ctx_uuid)
     {
@@ -289,23 +285,8 @@
     }
     if (-1 == send_status)
     {
-        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-        if (op_ctx)
-        {
-            axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(
-                        msg_ctx, env), env);
-            if (ctx)
-            {
-                property = AXIS2_CTX_GET_PROPERTY(ctx, env,
-                        AXIS2_RESPONSE_WRITTEN, AXIS2_FALSE);
-                if (property)
-                {
-                    ctx_written = AXIS2_PROPERTY_GET_VALUE(property, env);
-                    property = NULL;
-                }
-            }
-        }
-        if (ctx_written && AXIS2_STRCASECMP(ctx_written, "TRUE") == 0)
+        axis2_op_ctx_t *op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+        if (axis2_op_ctx_get_response_written(op_ctx, env))
         {
             send_status = OK;
             if (out_stream)

Modified: webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c?view=diff&rev=509061&r1=509060&r2=509061
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/util/http_transport_utils.c Sun
Feb 18 18:25:24 2007
@@ -176,7 +176,6 @@
     axis2_hash_t *headers = NULL;
     axis2_engine_t *engine = NULL;
     axiom_soap_body_t *soap_body = NULL;
-    axis2_property_t *property = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     axis2_hash_t *binary_data_map = NULL;
     axis2_char_t *soap_body_str = NULL;
@@ -218,13 +217,8 @@
             soap_action[soap_action_len -1] = '\0';
         }
     }
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS,
-            AXIS2_FALSE);
-    if (property)
-    {
-        headers = AXIS2_PROPERTY_GET_VALUE(property, env);
-        property = NULL;
-    }
+
+    headers = axis2_msg_ctx_get_transport_headers(msg_ctx, env);
     if (headers)
     {
         axis2_http_header_t *encoding_header = NULL;
@@ -254,13 +248,7 @@
     else
     {
         /* check content encoding from msg ctx property */
-        axis2_property_t *property = NULL;
-        axis2_char_t *value = NULL;
-        property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-            AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
-            AXIS2_FALSE);
-        if (property)
-            value = (axis2_char_t *)AXIS2_PROPERTY_GET_VALUE(property, env);
+        axis2_char_t *value = axis2_msg_ctx_get_transfer_encoding(msg_ctx, env);
 
         if (value && AXIS2_STRSTR(value, AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
         {
@@ -1082,13 +1070,9 @@
         AXIS2_FREE(env->allocator, callback_ctx);
         return NULL;
     }
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
-            AXIS2_HTTP_HEADER_TRANSFER_ENCODING, AXIS2_FALSE);
-    if (property)
-    {
-        trans_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
-        property = NULL;
-    }
+
+    trans_enc = axis2_msg_ctx_get_transfer_encoding(msg_ctx, env);
+    
     if (trans_enc && 0 == AXIS2_STRCMP(trans_enc,
             AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
     {



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