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 2006/05/22 15:17:21 UTC

svn commit: r408653 - /webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c

Author: samisa
Date: Mon May 22 06:17:21 2006
New Revision: 408653

URL: http://svn.apache.org/viewvc?rev=408653&view=rev
Log:
Added SOAP header adding support for service client

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?rev=408653&r1=408652&r2=408653&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Mon May 22 06:17:21 2006
@@ -20,6 +20,7 @@
 #include "callback_recv.h"
 #include <axis2_soap_const.h>
 #include <axis2_soap_body.h>
+#include <axis2_soap_header.h>
 #include "listener_manager.h"
 #include <axis2_module_desc.h>
 #include <axis2_array_list.h>
@@ -1241,6 +1242,34 @@
     if (!envelope)
     {
         return AXIS2_FALSE;
+    }
+
+    if (svc_client_impl->headers)
+    {
+        axis2_soap_header_t *soap_header = NULL;
+        soap_header = AXIS2_SOAP_ENVELOPE_GET_HEADER(envelope, env);
+    
+        if (soap_header)
+        {
+            axis2_om_node_t *header_node = NULL;
+            header_node = AXIS2_SOAP_HEADER_GET_BASE_NODE(soap_header, env);
+
+            if (header_node)
+            {
+                int size = 0;
+                int i = 0;
+                size = AXIS2_ARRAY_LIST_SIZE(svc_client_impl->headers, env);
+                for (i = 0; i < size; i++)
+                {
+                    axis2_om_node_t *node = NULL;
+                    node = AXIS2_ARRAY_LIST_GET(svc_client_impl->headers, env, i);
+                    if (node)
+                    {
+                        AXIS2_OM_NODE_ADD_CHILD(header_node, env, node);
+                    }
+                }
+            }
+        }
     }
 
     if (payload)



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