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

svn commit: r508365 - in /webservices/axis2/trunk/c: include/ modules/core/context/ modules/core/engine/ modules/core/transport/http/common/ modules/core/transport/http/sender/ modules/core/transport/http/server/IIS/ modules/core/transport/http/server/...

Author: samisa
Date: Fri Feb 16 02:56:53 2007
New Revision: 508365

URL: http://svn.apache.org/viewvc?view=rev&rev=508365
Log:
Removed hash for trnasport info property

Modified:
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/engine/engine.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/util/core_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=508365&r1=508364&r2=508365
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Fri Feb 16 02:56:53 2007
@@ -113,6 +113,7 @@
     struct axis2_options;
     struct axis2_transport_in_desc;    
     struct axis2_transport_out_desc;
+    struct axis2_http_out_transport_info;
 
     /**
      * Creates a message context struct instance.
@@ -1402,6 +1403,19 @@
 
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axis2_msg_ctx_reset_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN struct axis2_http_out_transport_info *AXIS2_CALL
+    axis2_msg_ctx_get_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_msg_ctx_set_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
+        const axis2_env_t *env,
+        struct axis2_http_out_transport_info *http_out_transport_info);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_msg_ctx_reset_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
         const axis2_env_t *env);
 
 /** Gets base context struct. */

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=508365&r1=508364&r2=508365
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Fri Feb 16 02:56:53 2007
@@ -23,6 +23,7 @@
 #include <axis2_conf.h>
 #include <axis2_transport_in_desc.h>
 #include <axis2_transport_out_desc.h>
+#include <axis2_http_out_transport_info.h>
 #include <axiom_soap_envelope.h>
 #include <axiom_soap_const.h>
 #include <axis2_options.h>
@@ -146,6 +147,7 @@
 
     axis2_string_t *charset_encoding;
     axis2_stream_t *transport_out_stream;
+    axis2_http_out_transport_info_t *http_out_transport_info;
 };
 
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
@@ -210,6 +212,7 @@
     msg_ctx->paused_phase_index = 0;
     msg_ctx->charset_encoding = NULL;
     msg_ctx->transport_out_stream = NULL;
+    msg_ctx->http_out_transport_info = NULL;
 
     msg_ctx->base = axis2_ctx_create(env);
     if (!(msg_ctx->base))
@@ -353,6 +356,11 @@
     {
        AXIS2_STREAM_FREE(msg_ctx->transport_out_stream, env); 
     }
+    
+    if (msg_ctx->http_out_transport_info)
+    {
+        AXIS2_HTTP_OUT_TRANSPORT_INFO_FREE(msg_ctx->http_out_transport_info, env);
+    }
         
     AXIS2_FREE(env->allocator, msg_ctx);
     msg_ctx = NULL;
@@ -2039,3 +2047,55 @@
     return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_http_out_transport_info_t *AXIS2_CALL
+axis2_msg_ctx_get_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{
+    if (msg_ctx)
+    {
+        return msg_ctx->http_out_transport_info;
+    }
+    else
+    {
+        return NULL;
+    }
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env,
+    axis2_http_out_transport_info_t *http_out_transport_info)
+{
+    if (msg_ctx)
+    {
+        if (msg_ctx->http_out_transport_info)
+        {
+           AXIS2_HTTP_OUT_TRANSPORT_INFO_FREE(msg_ctx->http_out_transport_info, env); 
+        }
+        
+        msg_ctx->http_out_transport_info = http_out_transport_info;
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}      
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_reset_http_out_transport_info(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{
+    if (msg_ctx)
+    {
+        msg_ctx->http_out_transport_info = NULL;
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+
+    return AXIS2_SUCCESS;
+}
+    

Modified: webservices/axis2/trunk/c/modules/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/engine.c?view=diff&rev=508365&r1=508364&r2=508365
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/engine.c Fri Feb 16 02:56:53 2007
@@ -567,7 +567,6 @@
     axis2_endpoint_ref_t *fault_to = NULL;
     axis2_endpoint_ref_t *reply_to = NULL;
     axis2_stream_t *stream = NULL;
-    axis2_property_t *property = NULL;
     axiom_soap_envelope_t *envelope = NULL;
     const axis2_char_t *wsa_action = NULL;
     const axis2_char_t *msg_id = NULL;
@@ -665,14 +664,8 @@
     AXIS2_MSG_CTX_SET_PROCESS_FAULT(fault_ctx, env, AXIS2_TRUE);
     AXIS2_MSG_CTX_SET_SERVER_SIDE(fault_ctx, env, AXIS2_TRUE);
 
-    property = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env,
-            AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
-    if (property)
-    {
-        AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-            AXIS2_PROPERTY_CLONE(property, env) , AXIS2_FALSE);
-        property = NULL;
-    }
+    axis2_msg_ctx_set_http_out_transport_info(fault_ctx, env, 
+        axis2_msg_ctx_get_http_out_transport_info(processing_context, env));
 
     envelope = AXIS2_MSG_CTX_GET_FAULT_SOAP_ENVELOPE(processing_context, env);
 
@@ -705,10 +698,8 @@
     }
 
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(fault_ctx, env, envelope);
-    property = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env, 
-        AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
-    AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-        AXIS2_PROPERTY_CLONE(property, env), AXIS2_FALSE);
+    axis2_msg_ctx_set_http_out_transport_info(fault_ctx, env, 
+        axis2_msg_ctx_get_http_out_transport_info(processing_context, env));
     return fault_ctx;
 }
 

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=508365&r1=508364&r2=508365
==============================================================================
--- 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 Fri Feb 16 02:56:53 2007
@@ -280,14 +280,8 @@
         axis2_string_free(svc_grp_uuid_str, env);
     }
 
-    property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
-    AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
-            axis2_http_out_transport_info_free_void_arg);
     http_out_transport_info = axis2_http_out_transport_info_create(env, response);
-    AXIS2_PROPERTY_SET_VALUE(property, env, http_out_transport_info);
-    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-            property, AXIS2_FALSE);
+    axis2_msg_ctx_set_http_out_transport_info(msg_ctx, env, http_out_transport_info);
 
     if (AXIS2_HTTP_SIMPLE_REQUEST_GET_FIRST_HEADER(simple_request, env,
             AXIS2_HTTP_HEADER_SOAP_ACTION))

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=508365&r1=508364&r2=508365
==============================================================================
--- 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 Fri Feb 16 02:56:53 2007
@@ -299,15 +299,7 @@
             axis2_http_out_transport_info_t *out_info = NULL;
             axis2_bool_t is_soap11 = AXIS2_FALSE;
 
-            property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
-                    AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
-            if (property)
-            {
-                out_info = (axis2_http_out_transport_info_t *)
-                    AXIS2_PROPERTY_GET_VALUE(property, env);
-                property = NULL;
-            }
-
+            out_info = axis2_msg_ctx_get_http_out_transport_info(msg_ctx, env);
 
             if (NULL == out_info)
             {

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=508365&r1=508364&r2=508365
==============================================================================
--- 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 Fri Feb 16 02:56:53 2007
@@ -249,15 +249,9 @@
         AXIS2_MSG_CTX_SET_SVC_GRP_CTX_ID(msg_ctx, env, uuid_str);
         axis2_string_free(uuid_str, env);
 	}
-    property = axis2_property_create(env);	
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
-    AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
-            axis2_iis_out_transport_info_free_void_arg);
-    iis_out_transport_info = axis2_iis_out_transport_info_create(env, lpECB);
-    AXIS2_PROPERTY_SET_VALUE(property, env, iis_out_transport_info);
-    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-            property, AXIS2_FALSE);
 
+    iis_out_transport_info = axis2_iis_out_transport_info_create(env, lpECB);
+    axis2_msg_ctx_set_http_out_transport_info(msg_ctx, env, iis_out_transport_info);
 	
 	cbSize = INTERNET_MAX_URL_LENGTH;
 	if (lpECB->GetServerVariable(lpECB->ConnID, "HTTP_SOAPAction", soap_action, &cbSize))

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=508365&r1=508364&r2=508365
==============================================================================
--- 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 Fri Feb 16 02:56:53 2007
@@ -224,15 +224,9 @@
         axis2_string_free(uuid_str, env);
     }
 
-    property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
-    AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
-            axis2_apache2_out_transport_info_free_void_arg);
     apache2_out_transport_info = axis2_apache2_out_transport_info_create(env,
             request);
-    AXIS2_PROPERTY_SET_VALUE(property, env, apache2_out_transport_info);
-    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-            property, AXIS2_FALSE);
+    axis2_msg_ctx_set_http_out_transport_info(msg_ctx, env, apache2_out_transport_info);
 
     soap_action = axis2_string_create(env, 
             (axis2_char_t *)apr_table_get(request->headers_in,

Modified: webservices/axis2/trunk/c/modules/core/util/core_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/util/core_utils.c?view=diff&rev=508365&r1=508364&r2=508365
==============================================================================
--- webservices/axis2/trunk/c/modules/core/util/core_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/util/core_utils.c Fri Feb 16 02:56:53 2007
@@ -135,6 +135,8 @@
 
     out_stream = axis2_msg_ctx_get_transport_out_stream(in_msg_ctx, env);
     axis2_msg_ctx_set_transport_out_stream(new_msg_ctx, env, out_stream);
+    axis2_msg_ctx_set_http_out_transport_info(new_msg_ctx, env, 
+        axis2_msg_ctx_get_http_out_transport_info(in_msg_ctx, env));
     /*property = AXIS2_MSG_CTX_GET_PROPERTY(in_msg_ctx, env,
             AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
     if (property)
@@ -218,6 +220,7 @@
     AXIS2_MSG_CTX_SET_OP_CTX(out_msg_ctx, env, NULL);
     AXIS2_MSG_CTX_SET_SVC_CTX(out_msg_ctx, env, NULL);
     axis2_msg_ctx_reset_transport_out_stream(out_msg_ctx, env);
+    axis2_msg_ctx_reset_http_out_transport_info(out_msg_ctx, env); 
     /*AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, AXIS2_TRANSPORT_OUT, NULL,
             AXIS2_FALSE);
     AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,



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