axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r393875 - /webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
Date Thu, 13 Apr 2006 18:08:05 GMT
Author: samisa
Date: Thu Apr 13 11:08:02 2006
New Revision: 393875

URL: http://svn.apache.org/viewcvs?rev=393875&view=rev
Log:
Fixed the incorrect SOAP Action for SOAP 1.2
We were adding it as SOAPAction http header, but this should really go as action part of Content-Type.
I fixed the code to send the SOAP action only if it is SOAP 1.1, else to append to Content-Type.


Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?rev=393875&r1=393874&r2=393875&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Thu
Apr 13 11:08:02 2006
@@ -264,9 +264,13 @@
 	http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_USER_AGENT, 
 						"Axis2/C");
 	AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
-	http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_SOAP_ACTION, 
-						soap_action);
-	AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+    {
+        http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_SOAP_ACTION, 
+                            soap_action);
+        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    }
+
 	if(AXIS2_FALSE == sender_impl->chunked)
 	{
 		axis2_char_t tmp_buf[10];
@@ -286,13 +290,26 @@
 	if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
 	{
 		content_type = AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+        content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+        content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
 	}
 	else
 	{
 		content_type = AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
+        content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+        content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
+        content_type = AXIS2_STRACAT(content_type, ";action=\"", env);
+        content_type = AXIS2_STRACAT(content_type, soap_action, env);
+        content_type = AXIS2_STRACAT(content_type, "\";", env);
 	}
 	http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE, 
 						content_type);
+    if (content_type)
+    {
+        AXIS2_FREE((*env)->allocator, content_type);
+        content_type = NULL;
+    }
+    
 	AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
 	if(0 == AXIS2_STRCMP(sender_impl->http_version, 
 		AXIS2_HTTP_HEADER_PROTOCOL_11))



Mime
View raw message