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/01/27 09:49:09 UTC

svn commit: r372784 - in /webservices/axis2/trunk/c/modules: core/receivers/raw_xml_in_out_msg_recv.c xml/om/om_output.c

Author: samisa
Date: Fri Jan 27 00:49:03 2006
New Revision: 372784

URL: http://svn.apache.org/viewcvs?rev=372784&view=rev
Log:
Added SOAP version handling logic. Also changed the encoding to UTF-8

Modified:
    webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
    webservices/axis2/trunk/c/modules/xml/om/om_output.c

Modified: webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c?rev=372784&r1=372783&r2=372784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c (original)
+++ webservices/axis2/trunk/c/modules/core/receivers/raw_xml_in_out_msg_recv.c Fri Jan 27 00:49:03 2006
@@ -84,6 +84,8 @@
     axis2_soap_body_t *out_body = NULL;
     axis2_om_node_t *out_node = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
+    axis2_char_t *soap_ns = AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;
+    axis2_om_namespace_t *env_ns = NULL;
     
     /* get the implementation class for the Web Service */
     svc_obj = AXIS2_MSG_RECV_GET_IMPL_OBJ(msg_recv, env, msg_ctx);
@@ -216,9 +218,18 @@
         }
     }
     
+    if (msg_ctx && AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+    {
+        soap_ns = AXIS2_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI; /* default is 1.2 */
+    }
+    
     /* create the soap envelope here*/
-    axis2_om_namespace_t *env_ns = 
-        axis2_om_namespace_create(env, "http://www.w3.org/2003/05/soap-envelope", "env"); /** TODO: Change to get the correct SOAP version */
+    env_ns = axis2_om_namespace_create(env, soap_ns, "soapenv"); 
+    if (!env_ns)
+    {
+        return NULL;
+    }
+    
     default_envelope = axis2_soap_envelope_create(env, env_ns);
 
     if (!default_envelope)

Modified: webservices/axis2/trunk/c/modules/xml/om/om_output.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_output.c?rev=372784&r1=372783&r2=372784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_output.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_output.c Fri Jan 27 00:49:03 2006
@@ -19,7 +19,8 @@
 #include <axis2_string.h>
 #include <axis2_xml_writer.h>
 
-#define AXIS2_DEFAULT_CHAR_SET_ENCODING  "ISO-8859-1"
+#define AXIS2_DEFAULT_CHAR_SET_ENCODING  "UTF-8"
+/*#define AXIS2_DEFAULT_CHAR_SET_ENCODING  "ISO-8859-1"*/
 #define MAX_ARGS  4
 /****************************** impl struct ***********************************/