You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/02/21 05:32:30 UTC

svn commit: r379333 - in /webservices/axis2/trunk/c: configure.ac include/axis2_msg_ctx.h modules/core/clientapi/call.c modules/core/transport/http/sender/http_transport_sender.c modules/mod_addr/addr_out_handler.c

Author: samisa
Date: Mon Feb 20 20:32:28 2006
New Revision: 379333

URL: http://svn.apache.org/viewcvs?rev=379333&view=rev
Log:
Fixed the setting of To in addressing when no To was set

Modified:
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/configure.ac?rev=379333&r1=379332&r2=379333&view=diff
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Mon Feb 20 20:32:28 2006
@@ -23,7 +23,7 @@
 AC_CHECK_LIB(cutest, CuTestInit)
 
 #CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -g3 -O2"
-CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE -g"
+CFLAGS="$CFLAGS -ansi -Wall -D_LARGEFILE64_SOURCE"
 #CFLAGS="$CFLAGS -Wall -ansi -Wshadow -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread"
 LDFLAGS="-lpthread"
 
@@ -118,7 +118,7 @@
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
-    CFLAGS=""
+    CFLAGS="$CFLAGS"
     ;;
   *)
     AC_MSG_RESULT(yes)
@@ -126,14 +126,14 @@
     ;;
   esac ],
   AC_MSG_RESULT(no)
-  CFLAGS=""
+  CFLAGS="$CFLAGS"
 )
 
 AC_ARG_ENABLE(tests, [  --enable-multi_threaded  enable trace. default=yes],
 [ case "${enableval}" in
   no)
     AC_MSG_RESULT(no)
-    CFLAGS=""
+    CFLAGS="$CFLAGS"
     ;;
   *)
     AC_MSG_RESULT(yes)
@@ -141,7 +141,7 @@
     ;;
   esac ],
   AC_MSG_RESULT(no)
-  CFLAGS=""
+  CFLAGS="$CFLAGS"
 )
 
 PKG_CHECK_MODULES(XML2, libxml-2.0)

Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=379333&r1=379332&r2=379333&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Mon Feb 20 20:32:28 2006
@@ -58,6 +58,8 @@
 #define AXIS2_DEFAULT_CHAR_SET_ENCODING "UTF_8"
 /** axis2 transport succeeded */
 #define AXIS2_TRANSPORT_SUCCEED "AXIS2_TRANSPORT_SUCCEED"
+
+#define AXIS2_TRANSPORT_URL "TransportURL"
     
 typedef struct axis2_msg_ctx_ops axis2_msg_ctx_ops_t;
 typedef struct axis2_msg_ctx axis2_msg_ctx_t; 

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=379333&r1=379332&r2=379333&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Mon Feb 20 20:32:28 2006
@@ -430,7 +430,9 @@
         axis2_soap_envelope_t *response_envelope = NULL;        
         
         /* Usual Request-Response Sync implemetation */
-        AXIS2_MSG_CTX_SET_TO(msg_ctx, env, call_impl->to);
+        AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+                                    AXIS2_TRANSPORT_URL, AXIS2_ENDPOINT_REF_GET_ADDRESS(call_impl->to, env), AXIS2_FALSE);
+        /*AXIS2_MSG_CTX_SET_TO(msg_ctx, env, call_impl->to);*/
         AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, svc_ctx);
         AXIS2_MSG_CTX_SET_CONF_CTX(msg_ctx, env, AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env));
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?rev=379333&r1=379332&r2=379333&view=diff
==============================================================================
--- 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 Mon Feb 20 20:32:28 2006
@@ -25,7 +25,6 @@
 #include <axis2_http_transport.h>
 #include <axis2_soap_over_http_sender.h>
 
-#define AXIS2_TRANSPORT_URL "TransportURL"
 
 /** 
  * @brief HTTP Transport Sender struct impl

Modified: webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c?rev=379333&r1=379332&r2=379333&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_addr/addr_out_handler.c Mon Feb 20 20:32:28 2006
@@ -195,7 +195,9 @@
     msg_info_headers = AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS (msg_ctx, env);
     soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE (msg_ctx, env);
     soap_header  = AXIS2_SOAP_ENVELOPE_GET_HEADER (soap_envelope, env);
-   
+  
+    if (!soap_header)
+        return AXIS2_SUCCESS; /*No SOAP header, so no point proceeding*/
 
     /* by this time, we definitely have some addressing information to be sent. This is because,
        // we have tested at the start of this whether msg_info_headers are null or not.
@@ -203,6 +205,15 @@
        // define that in the Header itself. */
     if (soap_header)
     {
+        axis2_any_content_type_t *reference_parameters = NULL;
+        axis2_char_t *action = NULL;
+        axis2_char_t *address = NULL;
+        axis2_char_t *svc_group_context_id = NULL;
+        axis2_char_t *message_id =  NULL;
+        axis2_relates_to_t *relates_to = NULL;
+        axis2_om_node_t *relates_to_header_node = NULL;
+        axis2_om_element_t *relates_to_header_ele = NULL;
+
         soap_header_node = AXIS2_SOAP_HEADER_GET_BASE_NODE (soap_header, env);
         soap_header_ele =
             (axis2_om_element_t *)
@@ -211,57 +222,49 @@
                                             soap_header_node, addressing_namespace);
 
         epr = AXIS2_MSG_INFO_HEADERS_GET_TO (msg_info_headers, env);
-    }
     
-    if (epr)
-    {
-        axis2_any_content_type_t *reference_parameters = NULL;
-        axis2_char_t *action = NULL;
-        axis2_char_t *address = NULL;
-        axis2_char_t *svc_group_context_id = NULL;
-        axis2_char_t *message_id =  NULL;
-        axis2_relates_to_t *relates_to = NULL;
-        axis2_om_node_t *relates_to_header_node = NULL;
-        axis2_om_element_t *relates_to_header_ele = NULL;
-        
+    
         
-        address = AXIS2_ENDPOINT_REF_GET_ADDRESS (epr, env);
-        if (address && AXIS2_STRCMP (address, "") != 0)
+       
+        if (epr) 
         {
-            axis2_om_node_t *to_header_block_node = NULL;
-            axis2_soap_header_block_t *to_header_block = NULL;
-            
-            to_header_block  =
-                AXIS2_SOAP_HEADER_ADD_HEADER_BLOCK (soap_header, env,
-                                                    AXIS2_WSA_TO,
-                                                    addressing_namespace);
-            to_header_block_node =
-                AXIS2_SOAP_HEADER_BLOCK_GET_BASE_NODE (to_header_block, env);
-            if (to_header_block_node)
+            address = AXIS2_ENDPOINT_REF_GET_ADDRESS (epr, env);
+            if (address && AXIS2_STRCMP (address, "") != 0)
             {
-                axis2_om_element_t *to_header_block_element = NULL;
-                to_header_block_element = (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(to_header_block_node, env);
-                if (to_header_block_element)
+                axis2_om_node_t *to_header_block_node = NULL;
+                axis2_soap_header_block_t *to_header_block = NULL;
+                
+                to_header_block  =
+                    AXIS2_SOAP_HEADER_ADD_HEADER_BLOCK (soap_header, env,
+                                                        AXIS2_WSA_TO,
+                                                        addressing_namespace);
+                to_header_block_node =
+                    AXIS2_SOAP_HEADER_BLOCK_GET_BASE_NODE (to_header_block, env);
+                if (to_header_block_node)
                 {
-                    AXIS2_OM_ELEMENT_SET_TEXT(to_header_block_element, env, address, to_header_block_node);
+                    axis2_om_element_t *to_header_block_element = NULL;
+                    to_header_block_element = (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(to_header_block_node, env);
+                    if (to_header_block_element)
+                    {
+                        AXIS2_OM_ELEMENT_SET_TEXT(to_header_block_element, env, address, to_header_block_node);
+                    }
                 }
             }
-        }
 
 
-        reference_parameters = AXIS2_ENDPOINT_REF_GET_REF_PARAMS (epr, env);
-        if (reference_parameters)
-        {
+            reference_parameters = AXIS2_ENDPOINT_REF_GET_REF_PARAMS (epr, env);
+            if (reference_parameters)
+            {
 
-            axis2_addr_out_handler_process_any_content_type (env,
-                                                             reference_parameters,
-                                                             soap_header_node,
-                                                             addr_ns);
-            axis2_addr_out_handler_add_to_header (env, epr, &soap_header_node,
-                                                  addr_ns);
-        }
+                axis2_addr_out_handler_process_any_content_type (env,
+                                                                 reference_parameters,
+                                                                 soap_header_node,
+                                                                 addr_ns);
+                axis2_addr_out_handler_add_to_header (env, epr, &soap_header_node,
+                                                      addr_ns);
+            }
 
-        
+        }
 
         action = AXIS2_MSG_INFO_HEADERS_GET_ACTION (msg_info_headers, env);
         if (action)