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 na...@apache.org on 2006/01/10 07:49:54 UTC

svn commit: r367509 - in /webservices/axis2/trunk/c: include/ modules/util/ modules/xml/om/ modules/xml/soap/ test/xml/om/

Author: nandika
Date: Mon Jan  9 22:49:39 2006
New Revision: 367509

URL: http://svn.apache.org/viewcvs?rev=367509&view=rev
Log: (empty)

Modified:
    webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
    webservices/axis2/trunk/c/include/axis2_soap_model_builder.h
    webservices/axis2/trunk/c/modules/util/stream.c
    webservices/axis2/trunk/c/modules/xml/om/om_node.c
    webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_model_builder.c
    webservices/axis2/trunk/c/test/xml/om/test_om.c

Modified: webservices/axis2/trunk/c/include/axis2_om_stax_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_om_stax_builder.h?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_om_stax_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_om_stax_builder.h Mon Jan  9 22:49:39 2006
@@ -113,7 +113,12 @@
          *
          */
         int (AXIS2_CALL *get_current_event)(struct axis2_om_stax_builder *builder,
-                                            axis2_env_t **env);                                                                                                      
+                                            axis2_env_t **env);
+                                            
+        axis2_om_node_t* (AXIS2_CALL *get_last_node)
+                                            (struct axis2_om_stax_builder* builder,
+                                             axis2_env_t **env);
+                                                                                                                                                          
                                                            
     } axis2_om_stax_builder_ops_t;
 
@@ -155,7 +160,10 @@
         ((builder)->ops->get_document(builder,env))
 /** returns the xml readers current event */
 #define AXIS2_OM_STAX_BUILDER_GET_CURRENT_EVENT(builder, env) \
-        ((builder)->ops->get_current_event(builder, env))        
+        ((builder)->ops->get_current_event(builder, env))
+        
+#define AXIS2_OM_STAX_BUILDER_GET_LAST_NODE(builder, env) \
+        ((builder)->ops->get_last_node(builder, env))                
 	
 /** @} */
 

Modified: webservices/axis2/trunk/c/include/axis2_soap_model_builder.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_model_builder.h?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_model_builder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_model_builder.h Mon Jan  9 22:49:39 2006
@@ -45,7 +45,7 @@
  *   ops Encapsulator struct of axis2_soap_operations 
  */
 
-AXIS2_DECLARE_DATA   struct axis2_soap_body_ops
+AXIS2_DECLARE_DATA   struct axis2_soap_model_builder_ops
 {
         axis2_status_t (AXIS2_CALL *free)(axis2_soap_model_builder_t *builder,
                                           axis2_env_t **env);

Modified: webservices/axis2/trunk/c/modules/util/stream.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/stream.c?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/stream.c (original)
+++ webservices/axis2/trunk/c/modules/util/stream.c Mon Jan  9 22:49:39 2006
@@ -110,9 +110,10 @@
 AXIS2_DECLARE(axis2_stream_t *)
 axis2_stream_create_internal (axis2_env_t **env)
 {
+    axis2_stream_impl_t *stream_impl = NULL;
 	AXIS2_ENV_CHECK(env, NULL);
     	
-	axis2_stream_impl_t *stream_impl = (axis2_stream_impl_t *)AXIS2_MALLOC(
+	stream_impl = (axis2_stream_impl_t *)AXIS2_MALLOC(
 						(*env)->allocator, sizeof(axis2_stream_impl_t));
 	
 	if(NULL == stream_impl)

Modified: webservices/axis2/trunk/c/modules/xml/om/om_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_node.c?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_node.c Mon Jan  9 22:49:39 2006
@@ -755,7 +755,8 @@
     if(!builder)
         return NULL;
     if(om_node_impl->builder_type = AXIS2_OM_STAX_BUILDER)        
-        return AXIS2_OM_STAX_BUILDER_NEXT((axis2_om_stax_builder_t*)builder, env);
+        return AXIS2_OM_DOCUMENT_BUILD_NEXT(om_node_impl->om_doc, env);
+    return NULL;        
 }
 
 axis2_status_t AXIS2_CALL

Modified: webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c Mon Jan  9 22:49:39 2006
@@ -50,6 +50,10 @@
 axis2_om_stax_builder_set_document(axis2_om_stax_builder_t *builder,
                                     axis2_env_t **env,
                                     axis2_om_document_t *document);                           
+   
+axis2_om_node_t*  AXIS2_CALL
+axis2_om_stax_builder_get_lastnode(axis2_om_stax_builder_t *builder,
+                                   axis2_env_t **env);
                            											
 int AXIS2_CALL
 axis2_om_stax_builder_get_current_event(axis2_om_stax_builder_t *builder,
@@ -136,6 +140,8 @@
 	        axis2_om_stax_builder_set_document;
 	builder->om_stax_builder.ops->get_current_event =
 	        axis2_om_stax_builder_get_current_event;
+    builder->om_stax_builder.ops->get_last_node = 
+            axis2_om_stax_builder_get_lastnode;	        
 	
     return &(builder->om_stax_builder);
 }
@@ -420,6 +426,7 @@
     {
         axis2_om_element_create (env , NULL, temp_localname, NULL, &element_node);
         AXIS2_OM_NODE_SET_DOCUMENT(element_node, env, builder_impl->document);        
+        
         /*
         if (AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(builder_impl->document, env))
              AXIS2_OM_NODE_FREE_TREE(
@@ -781,4 +788,13 @@
 {
     AXIS2_FUNC_PARAM_CHECK(builder, env, -1);
     return AXIS2_INTF_TO_IMPL(builder)->current_event;
-}                                        
+} 
+
+
+axis2_om_node_t*  AXIS2_CALL
+axis2_om_stax_builder_get_lastnode(axis2_om_stax_builder_t *builder,
+                                    axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(builder, env, NULL);
+    return AXIS2_INTF_TO_IMPL(builder)->lastnode;   
+}                                                                           

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_model_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_model_builder.c?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_model_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_model_builder.c Mon Jan  9 22:49:39 2006
@@ -47,6 +47,10 @@
     
     axis2_bool_t processing_mandatory_fault_elements;
     
+    void *builder_helper;
+    
+    int soap_version;
+    
 }axis2_soap_model_builder_impl_t;
 
 /***************** Macro ******************************************************/
@@ -83,3 +87,47 @@
 
 static void parse_headers();
 
+/***************** function implementations ***********************************/
+
+AXIS2_DECLARE(axis2_soap_model_builder_t *)
+axis2_soap_model_builder_create(axis2_env_t **env,
+                                axis2_om_stax_builder_t *builder)
+{
+    axis2_soap_model_builder_impl_t *builder_impl = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, builder, NULL);
+    
+    builder_impl = (axis2_soap_model_builder_impl_t*)AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_soap_model_builder_impl_t));
+    if(builder_impl == NULL)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    builder_impl->body_present = AXIS2_FALSE;
+    builder_impl->builder_helper = NULL;
+    builder_impl->element_level= 0;
+    builder_impl->header_present = AXIS2_FALSE;
+    builder_impl->om_builder = NULL;
+    builder_impl->processing_detail_elements = AXIS2_FALSE;
+    builder_impl->processing_fault = AXIS2_FALSE;
+    builder_impl->processing_mandatory_fault_elements = AXIS2_FALSE;
+    builder_impl->receiver_fault_code = NULL;
+    builder_impl->sender_fault_code = NULL;
+    builder_impl->soap_builder.ops = NULL;
+    
+    builder_impl->soap_builder.ops = (axis2_soap_model_builder_ops_t*)
+            AXIS2_MALLOC((*env)->allocator, sizeof(axis2_soap_model_builder_ops_t));
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+}                                
\ No newline at end of file

Modified: webservices/axis2/trunk/c/test/xml/om/test_om.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/xml/om/test_om.c?rev=367509&r1=367508&r2=367509&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/xml/om/test_om.c (original)
+++ webservices/axis2/trunk/c/test/xml/om/test_om.c Mon Jan  9 22:49:39 2006
@@ -152,7 +152,7 @@
     
     buffer = AXIS2_XML_WRITER_GET_XML(writer, &environment);
     
-    axis2_om_output_free(om_output, &environment);  
+    AXIS2_OM_OUTPUT_FREE(om_output, &environment);  
     if(buffer)
         printf("%s",buffer);
     
@@ -245,7 +245,7 @@
      AXIS2_OM_NODE_FREE_TREE(node1,&environment);
      output_buffer = AXIS2_XML_WRITER_GET_XML(writer, &environment);
      
-     axis2_om_output_free(om_output, &environment);
+     AXIS2_OM_OUTPUT_FREE(om_output, &environment);
      if(output_buffer)
      {
         printf("%s",output_buffer);
@@ -256,6 +256,7 @@
     return 0;
 }
 
+
 int
 main (int argc, char *argv[])
 {
@@ -266,13 +267,11 @@
     axis_log = axis2_log_create(allocator, NULL);
     error = axis2_error_create(allocator);
     
-    stream = axis2_stream_create(allocator, NULL);
-    
-    environment = axis2_env_create_with_error_stream_log(allocator, error, stream, axis_log);
+    environment = axis2_env_create_with_error_log(allocator, error,  axis_log);
     test_om_build (file_name);
     test_om_serialize();
     axis2_env_free(environment); 
     return 0;
- }
- 
- 
+}
+
+