ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r391018 - in /webservices/axis2/trunk/c: include/axis2_soap_fault_value.h modules/xml/soap/soap_fault_value.c
Date Mon, 03 Apr 2006 11:48:52 GMT
Author: nandika
Date: Mon Apr  3 04:48:50 2006
New Revision: 391018

URL: http://svn.apache.org/viewcvs?rev=391018&view=rev
Log:
set text method added 

Modified:
    webservices/axis2/trunk/c/include/axis2_soap_fault_value.h
    webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c

Modified: webservices/axis2/trunk/c/include/axis2_soap_fault_value.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_soap_fault_value.h?rev=391018&r1=391017&r2=391018&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_fault_value.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_fault_value.h Mon Apr  3 04:48:50 2006
@@ -64,12 +64,28 @@
 		  */
 		axis2_char_t* (AXIS2_CALL *
 		get_text)(axis2_soap_fault_value_t *fault_value,
-				axis2_env_t **env);		
-
+				axis2_env_t **env);	
+		
+		/**
+		  * Set the text value of the env:Value element directly under env:Code element
+		  * @param fault_value pointer to axis2_soap_fault_t
+		  * @param env Environment. MUST NOT BE NULL
+		  * @param text value to be set
+		  */
         axis2_om_node_t* (AXIS2_CALL *
 		get_base_node)(axis2_soap_fault_value_t *fault_value,
                        axis2_env_t **env);
-                              
+        /**
+         * set the text value of soap_fault_value element 
+         * @param fault_value pointer to soap fault value struct
+         * @param env environment MUST not be NULL
+         * @param text Text value to be set
+         */
+                                
+        axis2_status_t (AXIS2_CALL *
+		set_text)(axis2_soap_fault_value_t *fault_value,
+				axis2_env_t **env, axis2_char_t *text);	
+				
     };      
 
   /**
@@ -110,6 +126,9 @@
 
 #define AXIS2_SOAP_FAULT_VALUE_GET_TEXT(fault_value, env) \
 		((fault_value)->ops->get_text(fault_value, env))
+		
+#define AXIS2_SOAP_FAULT_VALUE_SET_TEXT(fault_value, env, text) \
+        ((fault_value)->ops->set_text(fault_value, env, text))		
 /** @} */
 
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c?rev=391018&r1=391017&r2=391018&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c (original)
+++ webservices/axis2/trunk/c/modules/xml/soap/soap_fault_value.c Mon Apr  3 04:48:50 2006
@@ -49,6 +49,12 @@
 axis2_char_t* AXIS2_CALL
 axis2_soap_fault_value_get_text(axis2_soap_fault_value_t *fault_value,
 									axis2_env_t **env);
+									
+axis2_status_t AXIS2_CALL
+axis2_soap_fault_value_set_text(axis2_soap_fault_value_t *fault_value,
+								axis2_env_t **env,
+								axis2_char_t *text);									
+									
 /*************************** function implementations *************************/
 
 AXIS2_DECLARE(axis2_soap_fault_value_t *)
@@ -273,3 +279,24 @@
 	
 	return AXIS2_OM_ELEMENT_GET_TEXT(value_element, env, value_node);
 }
+
+axis2_status_t AXIS2_CALL
+axis2_soap_fault_value_set_text(axis2_soap_fault_value_t *fault_value,
+								axis2_env_t **env,
+								axis2_char_t *text)
+{
+    axis2_soap_fault_value_impl_t *fault_value_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, text, AXIS2_FAILURE);
+    fault_value_impl = AXIS2_INTF_TO_IMPL(fault_value);
+    if(NULL != fault_value_impl->om_ele_node && 
+        AXIS2_OM_NODE_GET_NODE_TYPE(fault_value_impl->om_ele_node, env) == AXIS2_OM_ELEMENT)
+    {
+        axis2_om_element_t *om_ele = NULL;
+        om_ele = (axis2_om_element_t *)
+            AXIS2_OM_NODE_GET_DATA_ELEMENT(fault_value_impl->om_ele_node, env);
+        return AXIS2_OM_ELEMENT_SET_TEXT(om_ele, env, text, fault_value_impl->om_ele_node);
+    }
+    return AXIS2_FAILURE;
+}								
\ No newline at end of file



Mime
View raw message