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/01/31 10:37:49 UTC

svn commit: r373780 - in /webservices/axis2/trunk/c: modules/core/clientapi/mep_client.c modules/core/context/msg_ctx.c modules/core/transport/http/http_simple_request.c test/client/echo/echo_client.c

Author: samisa
Date: Tue Jan 31 01:37:37 2006
New Revision: 373780

URL: http://svn.apache.org/viewcvs?rev=373780&view=rev
Log:
Added some fixes related to transport and message context

Modified:
    webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c
    webservices/axis2/trunk/c/test/client/echo/echo_client.c

Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?rev=373780&r1=373779&r2=373780&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Tue Jan 31 01:37:37 2006
@@ -202,7 +202,7 @@
         return NULL;
     }
     
-    envelope = axis2_soap_envelope_create(env, NULL);
+    envelope = axis2_soap_envelope_create_default_soap_envelope(env, AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env)?AXIS2_SOAP11:AXIS2_SOAP12);
     if (!envelope)
     {
         return NULL;

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?rev=373780&r1=373779&r2=373780&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Tue Jan 31 01:37:37 2006
@@ -444,7 +444,7 @@
     msg_ctx_impl->doing_mtom = AXIS2_FALSE;
     msg_ctx_impl->doing_rest = AXIS2_FALSE;
     msg_ctx_impl->do_rest_through_post = AXIS2_TRUE;
-    msg_ctx_impl->is_soap_11 = AXIS2_TRUE;
+    msg_ctx_impl->is_soap_11 = AXIS2_FALSE;
     msg_ctx_impl->svc_grp_ctx_id = NULL;
     msg_ctx_impl->transport_in_desc_qname = NULL;
     msg_ctx_impl->transport_out_desc_qname = NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c?rev=373780&r1=373779&r2=373780&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c Tue Jan 31 01:37:37 2006
@@ -213,9 +213,11 @@
         for(i = 0; i< AXIS2_ARRAY_LIST_SIZE(simple_request_impl->header_group, 
                         env); i++)
         {
+            /*TODO: fix it here
             tmp = (axis2_http_header_t *)AXIS2_ARRAY_LIST_REMOVE(
                             simple_request_impl->header_group, env, i);
             AXIS2_HTTP_HEADER_FREE(tmp, env);        
+            */
         }
         AXIS2_ARRAY_LIST_FREE(simple_request_impl->header_group, env);
         simple_request_impl->header_group = NULL;
@@ -480,8 +482,8 @@
 	length = AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_LENGTH(simple_request, env);
 	if(length > 0)
 	{
-		*buf = (char*)AXIS2_MALLOC((*env)->allocator, length);
-		read_len = AXIS2_STREAM_READ(body, env, buf, length);
+		*buf = (char*)AXIS2_MALLOC((*env)->allocator, length + 1);
+		read_len = AXIS2_STREAM_READ(body, env, *buf, length + 1);
 		return read_len;
 	}
 	tmp_buf2 = AXIS2_MALLOC((*env)->allocator, 128 * sizeof(char));

Modified: webservices/axis2/trunk/c/test/client/echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/client/echo/echo_client.c?rev=373780&r1=373779&r2=373780&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/client/echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/test/client/echo/echo_client.c Tue Jan 31 01:37:37 2006
@@ -21,8 +21,8 @@
 #include <axis2_soap_fault_code.h>
 #include <axis2_soap_fault_role.h>
 
-axis2_soap_envelope_t *
-build_soap_programatically(axis2_env_t **env);
+axis2_om_node_t *
+build_om_programatically(axis2_env_t **env);
 
 int main(void)
 {
@@ -53,8 +53,7 @@
     AXIS2_FREE((env)->allocator, temp_path1);*/
     AXIS2_FREE((env)->allocator, temp_path2);
 
-    envelope = build_soap_programatically(&env);
-    node = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(envelope, &env);
+    node = build_om_programatically(&env);
     address = "http://localhost:9090/axis2/services/echo/echo";
     /*epr = axis2_endpoint_ref_create(&env, address);*/
     stub = 
@@ -76,8 +75,8 @@
     return status;
 }
 
-axis2_soap_envelope_t *
-build_soap_programatically(axis2_env_t **env)
+axis2_om_node_t *
+build_om_programatically(axis2_env_t **env)
 {
     axis2_soap_envelope_t *soap_envelope = NULL;
     axis2_soap_body_t *soap_body = NULL;
@@ -111,7 +110,7 @@
     
     body_om_node = AXIS2_SOAP_BODY_GET_BASE_NODE(soap_body, env);
     
-    echo_om_ele = axis2_om_element_create(env, body_om_node, "echoString", NULL, &echo_om_node);
+    echo_om_ele = axis2_om_element_create(env, NULL, "echoString", NULL, &echo_om_node);
     
     text_om_ele = axis2_om_element_create(env, echo_om_node, "text", NULL, &text_om_node);
 
@@ -121,10 +120,10 @@
     xml_writer = axis2_xml_writer_create_for_memory(env, NULL, AXIS2_FALSE, AXIS2_FALSE);
     om_output = axis2_om_output_create( env, xml_writer);
     
-    AXIS2_SOAP_ENVELOPE_SERIALIZE(soap_envelope, env, om_output, AXIS2_FALSE);
+    AXIS2_OM_NODE_SERIALIZE(echo_om_node, env, om_output);
     buffer = AXIS2_XML_WRITER_GET_XML(xml_writer, env);         
     printf("%s \n",  buffer); 
 
-    return soap_envelope;
+    return echo_om_node;
 }