axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r365325 - in /webservices/axis2/trunk/c: include/ modules/xml/om/ modules/xml/soap/
Date Mon, 02 Jan 2006 09:55:23 GMT
Author: nandika
Date: Mon Jan  2 01:54:38 2006
New Revision: 365325

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

Added:
    webservices/axis2/trunk/c/modules/xml/om/om_attribute.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_attribute.c
    webservices/axis2/trunk/c/modules/xml/om/om_child_element_iterator.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_child_element_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/om_children_iterator.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/om_children_qname_iterator.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_qname_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/om_children_with_specific_attribute_iterator.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_with_specific_attribute_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/om_comment.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_comment.c
    webservices/axis2/trunk/c/modules/xml/om/om_doctype.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_doctype.c
    webservices/axis2/trunk/c/modules/xml/om/om_document.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_document.c
    webservices/axis2/trunk/c/modules/xml/om/om_element.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_element.c
    webservices/axis2/trunk/c/modules/xml/om/om_namespace.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_namespace.c
    webservices/axis2/trunk/c/modules/xml/om/om_node.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_node.c
    webservices/axis2/trunk/c/modules/xml/om/om_output.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_output.c
    webservices/axis2/trunk/c/modules/xml/om/om_processing_instruction.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_processing_instruction.c
    webservices/axis2/trunk/c/modules/xml/om/om_stax_builder.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_stax_builder.c
    webservices/axis2/trunk/c/modules/xml/om/om_text.c
      - copied unchanged from r365299, webservices/axis2/trunk/c/modules/xml/om/axis2_om_text.c
Removed:
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_attribute.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_child_element_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_qname_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_children_with_specific_attribute_iterator.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_comment.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_doctype.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_document.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_element.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_namespace.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_node.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_output.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_processing_instruction.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_stax_builder.c
    webservices/axis2/trunk/c/modules/xml/om/axis2_om_text.c
Modified:
    webservices/axis2/trunk/c/include/axis2_soap_body.h
    webservices/axis2/trunk/c/modules/xml/om/Makefile.am
    webservices/axis2/trunk/c/modules/xml/soap/Makefile.am
    webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
    webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c

Modified: webservices/axis2/trunk/c/include/axis2_soap_body.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_body.h?rev=365325&r1=365324&r2=365325&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_body.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_body.h Mon Jan  2 01:54:38 2006
@@ -35,8 +35,8 @@
 #endif
 
 
-typedef struct axis2_soap_body axis2_soap_body_t;
-typedef struct axis2_soap_body_ops axis2_soap_body_ops_t;
+typedef struct axis2_soap_body      axis2_soap_body_t;
+typedef struct axis2_soap_body_ops  axis2_soap_body_ops_t;
     
 /**
  * @defgroup axis2_soap_body
@@ -72,7 +72,7 @@
          *         otherwise
          */
         axis2_bool_t (AXIS2_CALL *has_fault)(axis2_soap_body_t *body,
-                                                 axis2_env_t **env);
+                                             axis2_env_t **env);
         /**
          * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
          * object.
@@ -128,8 +128,7 @@
     
 AXIS2_DECLARE(axis2_soap_body_t *)
 axis2_soap_body_create_with_parent(axis2_env_t **env, 
-                                   struct axis2_soap_envelope *envelope,
-                                   axis2_om_namespace_t *ns);
+                                   struct axis2_soap_envelope *envelope);
     
 /******************** Macros **************************************************/
     
@@ -147,7 +146,10 @@
         ((body)->ops->add_fault(body, env, soap_fault))
         
 #define AXIS2_SOAP_BODY_GET_BASE_NODE(body, env) \
-        ((body)->ops->get_base(body, env))
+        ((body)->ops->get_base_node(body, env))
+                                   
+#define AXIS2_SOAP_BODY_SET_BASE_NODE(body, env, om_node) \
+        ((body)->ops->set_base_node(body, env, om_node))c
         
 #define AXIS2_SOAP_BODY_GET_SOAP_VERSION(body, env) \
         ((body)->ops->get_soap_version(body, env))

Modified: webservices/axis2/trunk/c/modules/xml/om/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/Makefile.am?rev=365325&r1=365324&r2=365325&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/om/Makefile.am Mon Jan  2 01:54:38 2006
@@ -1,20 +1,20 @@
 lib_LTLIBRARIES = libaxis2_om.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_om_la_SOURCES = axis2_om_attribute.c \
-                        axis2_om_document.c \
-                        axis2_om_node.c \
-                        axis2_om_text.c \
-                        axis2_om_comment.c \
-                        axis2_om_element.c \
-                        axis2_om_output.c \
-                        axis2_om_doctype.c \
-                        axis2_om_namespace.c \
-                        axis2_om_processing_instruction.c \
-                        axis2_om_stax_builder.c \
-                        axis2_om_children_iterator.c \
-                        axis2_om_children_qname_iterator.c \
-                        axis2_om_child_element_iterator.c \
-                        axis2_om_children_with_specific_attribute_iterator.c
+libaxis2_om_la_SOURCES = om_attribute.c \
+                        om_document.c \
+                        om_node.c \
+                        om_text.c \
+                        om_comment.c \
+                        om_element.c \
+                        om_output.c \
+                        om_doctype.c \
+                        om_namespace.c \
+                        om_processing_instruction.c \
+                        om_stax_builder.c \
+                        om_children_iterator.c \
+                        om_children_qname_iterator.c \
+                        om_child_element_iterator.c \
+                        om_children_with_specific_attribute_iterator.c
 
 libaxis2_om_la_LIBADD =  ../../util/libaxis2_util.la 
 INCLUDES = -I$(top_builddir)/include \

Modified: webservices/axis2/trunk/c/modules/xml/soap/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/Makefile.am?rev=365325&r1=365324&r2=365325&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/Makefile.am Mon Jan  2 01:54:38 2006
@@ -1,19 +1,19 @@
 lib_LTLIBRARIES = libaxis2_soap.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_soap_la_SOURCES = axis2_soap_fault.c \
-                            axis2_soap_fault_code.c \
-                            axis2_soap_fault_detail.c \
-                            axis2_soap_fault_node.c \
-                            axis2_soap_fault_reason.c \
-                            axis2_soap_fault_role.c \
-                            axis2_soap_fault_sub_code.c \
-                            axis2_soap_fault_text.c \
-                            axis2_soap_fault_value.c \
-                            axis2_soap_header_block.c \
-                            axis2_soap_header.c \
-                            axis2_soap_utils.c \
-                            soap_body.c \
-                            soap_envelope.c
+libaxis2_soap_la_SOURCES = soap_fault.c \
+                           soap_fault_code.c \
+                           soap_fault_detail.c \
+                           soap_fault_node.c \
+                           soap_fault_reason.c \
+                           soap_fault_role.c \
+                           soap_fault_sub_code.c \
+                           soap_fault_text.c \
+                           soap_fault_value.c \
+                           soap_header_block.c \
+                           soap_header.c \
+                           soap_utils.c \
+                           soap_body.c \
+                           soap_envelope.c
 
 libaxis2_soap_la_LIBADD = 
 INCLUDES = -I$(top_builddir)/include \

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_body.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_body.c?rev=365325&r1=365324&r2=365325&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_body.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_body.c Mon Jan  2 01:54:38 2006
@@ -70,6 +70,8 @@
 int AXIS2_CALL 
 axis2_soap_body_get_soap_version(axis2_soap_body_t *body,
                                  axis2_env_t **env);
+                                 
+                                 
 axis2_status_t AXIS2_CALL 
 axis2_soap_body_set_soap_version(axis2_soap_body_t *body,
                                  axis2_env_t **env,
@@ -112,6 +114,7 @@
     body_impl->soap_body.ops->get_fault = axis2_soap_body_get_fault;
     body_impl->soap_body.ops->add_fault = axis2_soap_body_add_fault;
     body_impl->soap_body.ops->get_base_node = axis2_soap_body_get_base_node;
+    body_impl->soap_body.ops->set_base_node = axis2_soap_body_set_base_node;
     body_impl->soap_body.ops->get_soap_version = axis2_soap_body_get_soap_version;
     body_impl->soap_body.ops->set_soap_version = axis2_soap_body_set_soap_version;
     
@@ -122,36 +125,45 @@
 
 
 axis2_soap_body_t* AXIS2_CALL
-axis2_soap_body_create_with_parent(axis2_env_t **env, axis2_soap_envelope_t *envelope, axis2_om_namespace_t
*ns)
+axis2_soap_body_create_with_parent(axis2_env_t **env, 
+                                   axis2_soap_envelope_t *envelope)
 {
     axis2_soap_body_impl_t *body_impl = NULL;
+    axis2_soap_body_t *body = NULL;
     axis2_om_element_t *ele = NULL;
     axis2_om_node_t *parent = NULL;
+    axis2_om_element_t *parent_ele =  NULL;
+    axis2_om_namespace_t *om_ns = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
     
+    body = axis2_soap_body_create(env);
+    if(!body)
+    {
+        return NULL;   
+    }
+    body_impl = AXIS2_INTF_TO_IMPL(body);
+   
+    
     /*get parent node from SOAP envelope */
     if (envelope)
     {
         parent = AXIS2_SOAP_ENVELOPE_GET_BASE_NODE(envelope, env);
-    }
-    
-    ele = axis2_om_element_create(env, parent, AXIS2_SOAP_BODY_LOCAL_NAME, ns, &(body_impl->om_ele_node));
+        if(parent)
+        {
+            parent_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(
+                        parent, env);
+        }            
+    }
+    ele = axis2_om_element_create(env, parent, 
+                                  AXIS2_SOAP_BODY_LOCAL_NAME, om_ns, 
+                                  &(body_impl->om_ele_node));
     if (!ele)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         axis2_soap_body_free(&(body_impl->soap_body), env);
         return NULL;
     }
-    
-    body_impl->soap_body.ops  = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_soap_body_ops_t)
);
-    if (!body_impl->soap_body.ops)
-    {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_soap_body_free(&(body_impl->soap_body), env);
-        return NULL;        
-    }
-    
     return &(body_impl->soap_body);           
 }
 
@@ -232,8 +244,30 @@
     axis2_soap_body_impl_t *body_impl = NULL;
     AXIS2_FUNC_PARAM_CHECK(body, env, NULL);
     body_impl = AXIS2_INTF_TO_IMPL(body);
-    
-    return body_impl->soap_fault;
+    if(body_impl->has_fault)
+    {
+        return body_impl->soap_fault;
+    }
+    /*
+    else
+    {
+        axis2_om_node_t *first_node = NULL;
+        axis2_om_element_t *first_ele = NULL;
+        axis2_om_namespace_t *om_ns = NULL;
+        axis2_char_t *ns_uri = NULL;
+        
+        first_node = AXIS2_OM_NODE_GET_FIRST_CHILD(body_impl->om_ele_node, env);
+        if(first_node)
+        {
+                
+            first_ele = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(first_node,
env);
+            om_ns = AXIS2_OM_ELEMENT_GET_NAMESPACE(first_ele, env);
+            ns_uri = AXIS2_OM_NAMESPACE_GET_URI(om_ns, env);
+            
+        }
+        
+    } 
+    */
     /*
     OMElement element = getFirstElement();
     if (has_fault) {

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=365325&r1=365324&r2=365325&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_envelope.c Mon Jan  2 01:54:38 2006
@@ -71,6 +71,12 @@
 axis2_om_node_t* AXIS2_CALL 
 axis2_soap_envelope_get_base_node(axis2_soap_envelope_t *envelope,
                              axis2_env_t **env);
+                             
+axis2_status_t AXIS2_CALL
+axis2_soap_envelope_set_base_node(axis2_soap_envelope_t *envelope,
+                                  axis2_env_t **env,
+                                  axis2_om_node_t *om_node);
+                                  
 int AXIS2_CALL 
 axis2_soap_envelope_get_soap_version(axis2_soap_envelope_t *envelope,
                                    axis2_env_t **env);



Mime
View raw message