axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r372167 - in /webservices/axis2/trunk/c: include/axis2_om_output.h modules/xml/om/om_output.c modules/xml/parser/axis2_xml_writer.h modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c modules/xml/soap/soap_envelope.c
Date Wed, 25 Jan 2006 09:16:44 GMT
Author: nandika
Date: Wed Jan 25 01:16:27 2006
New Revision: 372167

URL: http://svn.apache.org/viewcvs?rev=372167&view=rev
Log:
write_xml_version_encoding method added to om_output

Modified:
    webservices/axis2/trunk/c/include/axis2_om_output.h
    webservices/axis2/trunk/c/modules/xml/om/om_output.c
    webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h
    webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c

Modified: webservices/axis2/trunk/c/include/axis2_om_output.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_output.h?rev=372167&r1=372166&r2=372167&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_output.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_output.h Wed Jan 25 01:16:27 2006
@@ -107,6 +107,10 @@
         axis2_char_t* (AXIS2_CALL *get_content_type)                                    
                                
                                   (axis2_om_output_t *om_output,
                                    axis2_env_t **env);
+                                   
+        axis2_status_t (AXIS2_CALL *write_xml_version_encoding)
+                                  (axis2_om_output_t *om_output,
+                                   axis2_env_t **env);
 };  
     
 
@@ -180,6 +184,9 @@
         
 #define AXIS2_OM_OUTPUT_GET_CONTENT_TYPE(output, env) \
         ((output)->ops->get_content_type(output, env))                      
+
+#define AXIS2_OM_OUTPUT_WRITE_XML_VERSION_ENCODING(output, env) \
+        ((output)->ops->write_xml_version_encoding(output, env))
    
 /** @} */
 

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=372167&r1=372166&r2=372167&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_output.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_output.c Wed Jan 25 01:16:27 2006
@@ -18,9 +18,8 @@
 #include <stdarg.h>
 #include <axis2_xml_writer.h>
 
-#define   DEFAULT_CHAR_SET_ENCODING  "utf-8"
+#define AXIS2_DEFAULT_CHAR_SET_ENCODING  "utf-8"
 #define MAX_ARGS  4
-
 /****************************** impl struct ***********************************/
 
 typedef struct axis2_om_output_impl_t
@@ -104,7 +103,9 @@
                             (axis2_om_output_t *om_output,
                             axis2_env_t **env);                                         
                                                                                         
                                         
                                                                     
-
+axis2_status_t AXIS2_CALL
+axis2_om_output_write_xml_version_encoding(axis2_om_output_t *om_output,
+                                           axis2_env_t **env);
 
                       
 /*********************** end function prototypes ******************************/        
             
@@ -176,7 +177,10 @@
         axis2_om_output_is_ignore_xml_declaration;
         
     om_output_impl->om_output.ops->set_soap11 =
-        axis2_om_output_set_soap11;             
+        axis2_om_output_set_soap11;  
+
+    om_output_impl->om_output.ops->write_xml_version_encoding =
+        axis2_om_output_write_xml_version_encoding;
         
     return &(om_output_impl->om_output);
 }
@@ -224,7 +228,7 @@
 axis2_bool_t AXIS2_CALL 
 axis2_om_output_is_ignore_xml_declaration
                             (axis2_om_output_t *om_output,
-                            axis2_env_t **env)
+                             axis2_env_t **env)
 {
     AXIS2_FUNC_PARAM_CHECK(om_output, env, AXIS2_FAILURE);
     return AXIS2_INTF_TO_IMPL(om_output)->ignore_xml_declaration;
@@ -468,5 +472,17 @@
         return AXIS2_FAILURE;
 }
 
-
-
+axis2_status_t AXIS2_CALL 
+axis2_om_output_write_xml_version_encoding(axis2_om_output_t *om_output,
+                                           axis2_env_t **env)
+{
+    axis2_om_output_impl_t *output_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(om_output, env, AXIS2_FAILURE);
+    output_impl = AXIS2_INTF_TO_IMPL(om_output);
+    AXIS2_XML_WRITER_WRITE_START_DOCUMENT_WITH_VERSION_ENCODING(
+                                output_impl->xml_writer, 
+                                env, 
+                                output_impl->xml_version, 
+                                output_impl->char_set_encoding);
+    return AXIS2_SUCCESS;
+}

Modified: webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h?rev=372167&r1=372166&r2=372167&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h Wed Jan 25 01:16:27 2006
@@ -354,8 +354,8 @@
         axis2_status_t (AXIS2_CALL *write_start_document_with_version_encoding)(
                                                  axis2_xml_writer_t *writer,
                                                  axis2_env_t **env,
-                                                 axis2_char_t *encoding,
-                                                 axis2_char_t *version);
+                                                 axis2_char_t *version,
+                                                 axis2_char_t *encoding);
          
         /**
          * @param writer xml_writer
@@ -537,9 +537,9 @@
         ((writer)->ops->write_start_document_with_version(writer, env, version)) 
 
 #define AXIS2_XML_WRITER_WRITE_START_DOCUMENT_WITH_VERSION_ENCODING(\
-        writer, env, encoding, version) \
+        writer, env,  version, encoding) \
         ((writer)->ops->write_start_document_with_version_encoding(\
-        writer, env, encoding, version))
+        writer, env, version, encoding))
 
 #define AXIS2_XML_WRITER_WRITE_CHARACTERS(writer, env, text) \
         ((writer)->ops->write_characters(writer, env, text)) 

Modified: webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c?rev=372167&r1=372166&r2=372167&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/libxml2/axis2_libxml2_writer_wrapper.c Wed
Jan 25 01:16:27 2006
@@ -1176,14 +1176,12 @@
 axis2_libxml2_writer_wrapper_write_start_document_with_version_encoding(
                                          axis2_xml_writer_t *writer,
                                          axis2_env_t **env,
-                                         axis2_char_t *encoding,
-                                         axis2_char_t *version)
+                                         axis2_char_t *version,
+                                         axis2_char_t *encoding)
 {
     axis2_libxml2_writer_wrapper_impl_t *wrapper_impl = NULL;
     int status = 0;
     AXIS2_FUNC_PARAM_CHECK(writer, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, version, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, encoding, AXIS2_FAILURE);
     
     wrapper_impl = AXIS2_INTF_TO_IMPL(writer);
     status = xmlTextWriterStartDocument(wrapper_impl->xml_writer,

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c?rev=372167&r1=372166&r2=372167&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Wed Jan 25 01:16:27 2006
@@ -616,6 +616,7 @@
             }
         }
     }
+    AXIS2_OM_OUTPUT_WRITE_XML_VERSION_ENCODING(om_output, env);
     return AXIS2_OM_NODE_SERIALIZE(envelope_impl->om_ele_node, env, om_output);
 }
 



Mime
View raw message