axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r358457 - in /webservices/axis2/trunk/c: include/axis2_soap_fault_detail.h include/axis2_soap_fault_node.h modules/xml/soap/src/axis2_soap_fault_node.c modules/xml/soap/src/axis2_soap_fault_reason.c
Date Thu, 22 Dec 2005 03:00:40 GMT
Author: nandika
Date: Wed Dec 21 19:00:30 2005
New Revision: 358457

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

Added:
    webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_node.c
Modified:
    webservices/axis2/trunk/c/include/axis2_soap_fault_detail.h
    webservices/axis2/trunk/c/include/axis2_soap_fault_node.h
    webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_reason.c

Modified: webservices/axis2/trunk/c/include/axis2_soap_fault_detail.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_fault_detail.h?rev=358457&r1=358456&r2=358457&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_fault_detail.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_fault_detail.h Wed Dec 21 19:00:30 2005
@@ -61,7 +61,7 @@
         axis2_status_t (AXIS2_CALL *add_detail_entry)
                                 (axis2_soap_fault_detail_t *fault_detail,
                                  axis2_env_t **env,
-                                 axis2_om_node_t *detail_node);
+                                 axis2_om_node_t *ele_node);
                                  
         axis2_om_children_iterator_t* (AXIS2_CALL *get_all_detail_entries)
                                 (axis2_soap_fault_detail_t *fault_detail,
@@ -105,7 +105,7 @@
 axis2_soap_fault_detail_create_with_parent_extract
                 (axis2_env_t **env,
                  axis2_soap_fault_t *fault,
-                 axis2_bool_t *extract_namespace_from_parent);
+                 axis2_bool_t *extract_ns_from_parent);
 
 /******************** Macros **************************************************/
     
@@ -114,8 +114,8 @@
 #define AXIS2_SOAP_FAULT_DETAIL_FREE(fault_detail , env) \
         ((fault_detail)->ops->free_fn(fault_detail, env))
 
-#define AXIS2_SOAP_FAULT_DETAIL_ADD_DETAIL_ENTRY(fault_detail, env, detail) \
-        ((fault_detail)->ops->add_detail_entry(fault_detail, env, detail))
+#define AXIS2_SOAP_FAULT_DETAIL_ADD_DETAIL_ENTRY(fault_detail, env, ele_node) \
+        ((fault_detail)->ops->add_detail_entry(fault_detail, env, ele_node))
 
 #define AXIS2_SOAP_FAULT_DETAIL_GET_ALL_DETAIL_ENTRIES(fault_detail, env) \
         ((fault_detail)->ops->get_all_detail_entries(fault_detail, env))          
      

Modified: webservices/axis2/trunk/c/include/axis2_soap_fault_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_fault_node.h?rev=358457&r1=358456&r2=358457&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_fault_node.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_fault_node.h Wed Dec 21 19:00:30 2005
@@ -52,26 +52,35 @@
         */
 
         axis2_status_t (AXIS2_CALL *free_fn)
-                                    (axis2_soap_fault_node_t *fault_node,
-                                     axis2_env_t **env);
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env);
 
         axis2_status_t (AXIS2_CALL *set_value)
-                                    (axis2_soap_fault_node_t *fault_node,
-                                     axis2_env_t **env,
-                                     axis2_soap_fault_value_t *fault_val);
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env,
+                                    axis2_char_t *fault_val);
                                      
-        axis2_soap_fault_value_t* (AXIS2_CALL *get_value)                               
         
-                                    (axis2_soap_fault_node_t *fault_node,
-                                     axis2_env_t **env);
+        axis2_char_t* (AXIS2_CALL *get_value)                                         
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env);
                                      
         axis2_status_t (AXIS2_CALL *set_base_node)
-                                    (axis2_soap_fault_node_t *fault_node,
-                                     axis2_env_t **env,
-                                     axis2_om_node_t *node);
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env,
+                                    axis2_om_node_t *node);
     
         axis2_om_node_t* (AXIS2_CALL *get_base_node)
-                                (axis2_soap_fault_node_t *fault_node,
-                                 axis2_env_t **env);
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env);
+                                    
+        int (AXIS2_CALL *get_soap_version)
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env);
+                                 
+        axis2_status_t (AXIS2_CALL *set_soap_version)
+                                   (axis2_soap_fault_node_t *fault_node,
+                                    axis2_env_t **env,
+                                    int soap_version);                                  
  
                                                                                         
                       
     };      
 
@@ -92,7 +101,7 @@
     */
 AXIS2_DECLARE(axis2_soap_fault_node_t *)
 axis2_soap_fault_node_create_with_parent(axis2_env_t **env,
-                            axis2_soap_fault_t *fault);
+                                         axis2_soap_fault_t *fault);
                             
 
 AXIS2_DECLARE(axis2_soap_fault_node_t *)
@@ -105,8 +114,8 @@
 #define AXIS2_SOAP_FAULT_NODE_FREE(fault_node , env) \
         ((fault_node)->ops->free_fn(fault_node, env))
 
-#define AXIS2_SOAP_FAULT_NODE_SET_VALUE(fault_node , env, value) \
-        ((fault_node)->ops->set_value(fault_node, env, value))
+#define AXIS2_SOAP_FAULT_NODE_SET_VALUE(fault_node , env, uri) \
+        ((fault_node)->ops->set_value(fault_node, env, uri))
 
         
 #define AXIS2_SOAP_FAULT_NODE_GET_VALUE(fault_node , env) \
@@ -116,12 +125,18 @@
         ((fault_node)->ops->get_base_node(fault_node, env))         
 
 #define AXIS2_SOAP_FAULT_NODE_SET_BASE(fault_node, env, node) \
-        ((fault_node)->ops->set_base_node(fault_node, env, node))  
+        ((fault_node)->ops->set_base_node(fault_node, env, node))
+        
+#define AXIS2_SOAP_FAULT_NODE_SET_SOAP_VERSION(fault_node, env, soap_version) \
+        ((fault_node)->ops->set_soap_version(fault_node, env, soap_version))
+        
+#define AXIS2_SOAP_FAULT_NODE_GET_SOAP_VERSION(fault_node, env) \
+        ((fault_node)->ops->get_soap_version(fault_node, env))
+                        
 /** @} */
 
 #ifdef __cplusplus
 }
 #endif
 
- 
- #endif /* AXIS2_SOAP_FAULT_NODE_H */
\ No newline at end of file
+#endif /* AXIS2_SOAP_FAULT_NODE_H */
\ No newline at end of file

Added: webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_node.c?rev=358457&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_node.c (added)
+++ webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_node.c Wed Dec 21 19:00:30
2005
@@ -0,0 +1,271 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+ #include <axis2_soap_fault_node.h>
+ #include <axis2_om_node.h>
+ #include <axis2_om_element.h>
+ 
+ /********************* impl struct *******************************************/
+ 
+ typedef struct axis2_soap_fault_node_impl_t
+ {
+    axis2_soap_fault_node_t fault_node;
+    
+    axis2_om_element_t *om_ele;
+    
+    axis2_om_node_t *om_ele_node;
+    
+    axis2_soap_fault_t *parent;
+    
+    int soap_version;
+ 
+ }axis2_soap_fault_node_impl_t;
+ 
+ /******************* Macro ***************************************************/
+ 
+ #define AXIS2_INTF_TO_IMPL(node) ((axis2_soap_fault_node_impl_t*)node) 
+ 
+ /****************** function prototypes **************************************/
+ 
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_free(axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_value
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           axis2_char_t *fault_val);
+                            
+axis2_char_t* AXIS2_CALL 
+axis2_soap_fault_node_get_value
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env);
+                            
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_base_node
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           axis2_om_node_t *node);
+
+axis2_om_node_t* AXIS2_CALL 
+axis2_soap_fault_node_get_base_node
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env);
+                        
+int AXIS2_CALL axis2_soap_fault_node_get_soap_version
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env);
+                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_soap_version
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           int soap_version);
+ 
+ /*********************** function implementations ****************************/
+
+AXIS2_DECLARE(axis2_soap_fault_node_t *)
+axis2_soap_fault_node_create(axis2_env_t **env)
+{
+    axis2_soap_fault_node_impl_t *fault_node_impl = NULL;
+    
+    fault_node_impl = (axis2_soap_fault_node_impl_t*)AXIS2_MALLOC(
+                            (*env)->allocator,
+                            sizeof(axis2_soap_fault_node_impl_t*));
+    if(!fault_node_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }                            
+    fault_node_impl->fault_node.ops = NULL;
+    fault_node_impl->om_ele = NULL;
+    fault_node_impl->om_ele_node = NULL;
+    fault_node_impl->parent = NULL;
+    
+    fault_node_impl->fault_node.ops = (axis2_soap_fault_node_ops_t*)AXIS2_MALLOC(
+                    (*env)->allocator, sizeof(axis2_soap_fault_node_ops_t));
+                    
+    if(!(fault_node_impl->fault_node.ops))
+    {
+        AXIS2_FREE((*env)->allocator, fault_node_impl);
+        fault_node_impl = NULL;
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }                    
+                                                                        
+    fault_node_impl->fault_node.ops->get_soap_version =
+        axis2_soap_fault_node_get_soap_version;
+    
+    fault_node_impl->fault_node.ops->set_soap_version =
+        axis2_soap_fault_node_set_soap_version;
+                
+    fault_node_impl->fault_node.ops->set_base_node =
+        axis2_soap_fault_node_set_base_node;
+        
+    fault_node_impl->fault_node.ops->get_base_node =
+        axis2_soap_fault_node_get_base_node;
+        
+    fault_node_impl->fault_node.ops->set_value =
+        axis2_soap_fault_node_set_value;
+        
+    fault_node_impl->fault_node.ops->get_value =
+        axis2_soap_fault_node_get_value;
+    fault_node_impl->fault_node.ops->free_fn =
+        axis2_soap_fault_node_free;
+                                        
+    return &(fault_node_impl->fault_node);
+}
+ 
+AXIS2_DECLARE(axis2_soap_fault_node_t *)
+axis2_soap_fault_node_create_with_parent(axis2_env_t **env,
+                                         axis2_soap_fault_t *fault)
+{
+    axis2_soap_fault_node_impl_t *fault_node_impl = NULL;
+    axis2_soap_fault_node_t *fault_node = NULL;
+    axis2_om_element_t *this_ele = NULL;
+    axis2_om_node_t *this_node = NULL;
+    axis2_om_node_t *parent_node = NULL;
+    axis2_om_element_t *parent_ele = NULL;
+    axis2_om_namespace_t *parent_ns = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, fault, NULL);
+    
+    fault_node = axis2_soap_fault_node_create(env);
+    if(!fault_node)
+        return NULL;
+        
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
+    
+    fault_node_impl->parent = fault;
+    
+    parent_node = AXIS2_SOAP_FAULT_GET_BASE_NODE(fault, env);
+    
+    parent_ele  = (axis2_om_element_t *)AXIS2_OM_NODE_GET_DATA_ELEMENT(
+                        fault_node_impl->om_ele_node, env);
+    
+    parent_ns = AXIS2_OM_ELEMENT_GET_NAMESPACE(parent_ele, env);
+    this_ele = axis2_om_element_create(env, 
+                                       parent_node,                             
+                                       AXIS2_SOAP12_SOAP_FAULT_ROLE_LOCAL_NAME,
+                                       parent_ns,
+                                       &this_node);
+    fault_node_impl->om_ele = this_ele;
+    fault_node_impl->om_ele_node = this_node;                                       
+    return  &(fault_node_impl->fault_node);  
+}
+
+                                    
+                                         
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_free(axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, AXIS2_FAILURE);
+    if(fault_node->ops)
+    {
+        AXIS2_FREE((*env)->allocator, fault_node->ops);
+        fault_node->ops = NULL;
+    }
+    AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(fault_node));
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_value
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           axis2_char_t *uri)
+{
+    axis2_soap_fault_node_impl_t *fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, uri, AXIS2_FAILURE);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
+    return AXIS2_OM_ELEMENT_SET_TEXT(fault_node_impl->om_ele,
+                    env, uri, fault_node_impl->om_ele_node);
+}
+                            
+axis2_char_t* AXIS2_CALL 
+axis2_soap_fault_node_get_value
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env)
+{
+    axis2_soap_fault_node_impl_t *fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, NULL);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
+    return AXIS2_OM_ELEMENT_GET_TEXT(fault_node_impl->om_ele,
+                env, fault_node_impl->om_ele_node);
+}
+                            
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_base_node
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           axis2_om_node_t *node)
+{
+    axis2_soap_fault_node_impl_t* fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, AXIS2_FAILURE);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node); 
+    if(AXIS2_OM_NODE_GET_NODE_TYPE(node, env) != AXIS2_OM_ELEMENT)
+    {
+        AXIS2_ERROR_SET((*env)->error, 
+                AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+    
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
+    fault_node_impl->om_ele_node = node;
+    fault_node_impl->om_ele = (axis2_om_element_t *) 
+                            AXIS2_OM_NODE_GET_DATA_ELEMENT(node, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_om_node_t* AXIS2_CALL 
+axis2_soap_fault_node_get_base_node
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env)
+{
+    axis2_soap_fault_node_impl_t* fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, NULL);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node); 
+    return fault_node_impl->om_ele_node;
+}
+                        
+int AXIS2_CALL axis2_soap_fault_node_get_soap_version
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env)
+{
+    axis2_soap_fault_node_impl_t* fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, AXIS2_FAILURE);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node); 
+    return fault_node_impl->soap_version;
+}
+                        
+axis2_status_t AXIS2_CALL 
+axis2_soap_fault_node_set_soap_version
+                          (axis2_soap_fault_node_t *fault_node,
+                           axis2_env_t **env,
+                           int soap_version)
+{
+    axis2_soap_fault_node_impl_t* fault_node_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(fault_node, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, soap_version, AXIS2_FAILURE);
+    fault_node_impl = AXIS2_INTF_TO_IMPL(fault_node);
+    fault_node_impl->soap_version = soap_version;
+    return AXIS2_SUCCESS;
+}                                         
+                            

Modified: webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_reason.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_reason.c?rev=358457&r1=358456&r2=358457&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_reason.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/src/axis2_soap_fault_reason.c Wed Dec 21 19:00:30
2005
@@ -176,7 +176,7 @@
     
     this_ele = axis2_om_element_create(env, 
                                        parent_node,                             
-                                       AXIS2_SOAP12_SOAP_FAULT_ROLE_LOCAL_NAME,
+                                       AXIS2_SOAP12_SOAP_FAULT_REASON_LOCAL_NAME,
                                        parent_ns,
                                        &this_node);
     fault_reason_impl->om_ele = this_ele;



Mime
View raw message