axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r805360 [11/13] - in /webservices/axis2/trunk/c/axiom/src: attachments/ om/ parser/ parser/guththila/ parser/libxml2/ soap/ util/ xpath/
Date Tue, 18 Aug 2009 11:08:44 GMT
Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -57,14 +56,11 @@
     const axutil_env_t * env)
 {
     axiom_soap_fault_t *soap_fault = NULL;
-    soap_fault = (axiom_soap_fault_t *) AXIS2_MALLOC(env->allocator,
-                                                     sizeof
-                                                     (axiom_soap_fault_t));
-    if (!soap_fault)
+    soap_fault = (axiom_soap_fault_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_soap_fault_t));
+    if(!soap_fault)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create a SOAP fault");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create a SOAP fault");
         return NULL;
     }
     soap_fault->exception = NULL;
@@ -75,7 +71,7 @@
     soap_fault->frole = NULL;
     soap_fault->om_ele_node = NULL;
     soap_fault->soap_builder = NULL;
-	soap_fault->soap_version = -1;
+    soap_fault->soap_version = -1;
     return soap_fault;
 }
 
@@ -94,32 +90,29 @@
     AXIS2_PARAM_CHECK(env->error, body, NULL);
 
     soap_fault = axiom_soap_fault_create(env);
-    if (!soap_fault)
+    if(!soap_fault)
     {
         return NULL;
     }
     parent_node = axiom_soap_body_get_base_node(body, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         AXIS2_FREE(env->allocator, soap_fault);
         return NULL;
     }
     soap_fault->soap_version = axiom_soap_body_get_soap_version(body, env);
 
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         AXIS2_FREE(env->allocator, soap_fault);
         return NULL;
     }
     parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
 
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP_FAULT_LOCAL_NAME,
-                                    parent_ns, &this_node);
-    if (!this_ele)
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP_FAULT_LOCAL_NAME, parent_ns,
+        &this_node);
+    if(!this_ele)
     {
         AXIS2_FREE(env->allocator, soap_fault);
         return NULL;
@@ -141,12 +134,12 @@
     AXIS2_PARAM_CHECK(env->error, body, NULL);
     AXIS2_PARAM_CHECK(env->error, exception, NULL);
     soap_fault = axiom_soap_fault_create_with_parent(env, body);
-    if (!soap_fault)
+    if(!soap_fault)
     {
         return NULL;
     }
     status = axiom_soap_fault_set_exception(soap_fault, env, exception);
-    if (status == AXIS2_FAILURE)
+    if(status == AXIS2_FAILURE)
     {
         axiom_soap_fault_free(soap_fault, env);
         return NULL;
@@ -160,27 +153,27 @@
     const axutil_env_t * env)
 {
 
-    if (soap_fault->fcode)
+    if(soap_fault->fcode)
     {
         axiom_soap_fault_code_free(soap_fault->fcode, env);
         soap_fault->fcode = NULL;
     }
-    if (soap_fault->fdetail)
+    if(soap_fault->fdetail)
     {
         axiom_soap_fault_detail_free(soap_fault->fdetail, env);
         soap_fault->fdetail = NULL;
     }
-    if (soap_fault->fnode)
+    if(soap_fault->fnode)
     {
         axiom_soap_fault_node_free(soap_fault->fnode, env);
         soap_fault->fnode = NULL;
     }
-    if (soap_fault->freason)
+    if(soap_fault->freason)
     {
         axiom_soap_fault_reason_free(soap_fault->freason, env);
         soap_fault->freason = NULL;
     }
-    if (soap_fault->frole)
+    if(soap_fault->frole)
     {
         axiom_soap_fault_role_free(soap_fault->frole, env);
         soap_fault->frole = NULL;
@@ -197,16 +190,15 @@
     axiom_soap_fault_code_t * code)
 {
     AXIS2_PARAM_CHECK(env->error, code, AXIS2_FAILURE);
-    if (!(soap_fault->fcode))
+    if(!(soap_fault->fcode))
     {
         soap_fault->fcode = code;
         return AXIS2_SUCCESS;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log,
-                        AXIS2_LOG_SI,
-                        "tring to set multiple code elements to soap_fault ");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+            "tring to set multiple code elements to soap_fault ");
 
     }
     return AXIS2_SUCCESS;
@@ -218,17 +210,16 @@
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
-    if (soap_fault->fcode)
+    if(soap_fault->fcode)
     {
         return soap_fault->fcode;
     }
-    else if (soap_fault->soap_builder)
+    else if(soap_fault->soap_builder)
     {
-        while (!(soap_fault->fcode) &&
-               !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
+        while(!(soap_fault->fcode) && !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(soap_fault->soap_builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -244,15 +235,14 @@
     axiom_soap_fault_reason_t * reason)
 {
     AXIS2_PARAM_CHECK(env->error, reason, AXIS2_FAILURE);
-    if (!(soap_fault->freason))
+    if(!(soap_fault->freason))
     {
         soap_fault->freason = reason;
         return AXIS2_SUCCESS;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log,
-                        AXIS2_LOG_SI, "tring to set soap_fault reason twice");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "tring to set soap_fault reason twice");
     }
     return AXIS2_FAILURE;
 }
@@ -263,17 +253,16 @@
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
-    if (soap_fault->freason)
+    if(soap_fault->freason)
     {
         return soap_fault->freason;
     }
-    else if (soap_fault->soap_builder)
+    else if(soap_fault->soap_builder)
     {
-        while (!(soap_fault->freason) &&
-               !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
+        while(!(soap_fault->freason) && !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(soap_fault->soap_builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -289,16 +278,14 @@
     axiom_soap_fault_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
-    if (!(soap_fault->fnode))
+    if(!(soap_fault->fnode))
     {
         soap_fault->fnode = node;
         return AXIS2_SUCCESS;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log,
-                        AXIS2_LOG_SI,
-                        "tring to set soap_fault node more than once");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "tring to set soap_fault node more than once");
     }
     return AXIS2_FAILURE;
 }
@@ -310,17 +297,16 @@
 {
     int status = AXIS2_SUCCESS;
 
-    if (soap_fault->fnode)
+    if(soap_fault->fnode)
     {
         return soap_fault->fnode;
     }
-    else if (soap_fault->soap_builder)
+    else if(soap_fault->soap_builder)
     {
-        while (!(soap_fault->fnode) &&
-               !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
+        while(!(soap_fault->fnode) && !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(soap_fault->soap_builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -337,16 +323,14 @@
 {
     AXIS2_PARAM_CHECK(env->error, role, AXIS2_FAILURE);
 
-    if (!(soap_fault->frole))
+    if(!(soap_fault->frole))
     {
         soap_fault->frole = role;
         return AXIS2_FAILURE;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log,
-                        AXIS2_LOG_SI,
-                        "tring to set soap_fault role more than once ");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "tring to set soap_fault role more than once ");
     }
     return AXIS2_FAILURE;
 
@@ -358,17 +342,16 @@
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
-    if (soap_fault->frole)
+    if(soap_fault->frole)
     {
         return soap_fault->frole;
     }
-    else if (soap_fault->soap_builder)
+    else if(soap_fault->soap_builder)
     {
-        while (!(soap_fault->frole) &&
-               !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
+        while(!(soap_fault->frole) && !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(soap_fault->soap_builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -385,16 +368,14 @@
 {
     AXIS2_PARAM_CHECK(env->error, detail, AXIS2_FAILURE);
 
-    if (!(soap_fault->fdetail))
+    if(!(soap_fault->fdetail))
     {
         soap_fault->fdetail = detail;
         return AXIS2_SUCCESS;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log,
-                        AXIS2_LOG_SI,
-                        " tring to set soap_fault detail more than once");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, " tring to set soap_fault detail more than once");
 
     }
     return AXIS2_FAILURE;
@@ -406,17 +387,16 @@
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
-    if (soap_fault->fdetail)
+    if(soap_fault->fdetail)
     {
         return soap_fault->fdetail;
     }
-    else if (soap_fault->soap_builder)
+    else if(soap_fault->soap_builder)
     {
-        while (!(soap_fault->fdetail) &&
-               !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
+        while(!(soap_fault->fdetail) && !(axiom_node_is_complete(soap_fault->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(soap_fault->soap_builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -433,10 +413,9 @@
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE,
-                        AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     soap_fault->om_ele_node = node;
@@ -466,30 +445,24 @@
     axis2_char_t *excep = NULL;
 
     detail = axiom_soap_fault_get_detail(soap_fault, env);
-    if (!detail)
+    if(!detail)
     {
         return NULL;
     }
     detail_node = axiom_soap_fault_detail_get_base_node(detail, env);
-    if (detail_node)
+    if(detail_node)
     {
-        detail_ele =
-            (axiom_element_t *) axiom_node_get_data_element(detail_node, env);
+        detail_ele = (axiom_element_t *)axiom_node_get_data_element(detail_node, env);
 
-        qn = axutil_qname_create(env,
-                                 AXIOM_SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, NULL,
-                                 NULL);
-        if (qn)
+        qn = axutil_qname_create(env, AXIOM_SOAP_FAULT_DETAIL_EXCEPTION_ENTRY, NULL, NULL);
+        if(qn)
         {
-            exception_ele =
-                axiom_element_get_first_child_with_qname(detail_ele, env, qn,
-                                                         detail_node,
-                                                         &exception_node);
+            exception_ele = axiom_element_get_first_child_with_qname(detail_ele, env, qn,
+                detail_node, &exception_node);
             axutil_qname_free(qn, env);
-            if (exception_ele)
+            if(exception_ele)
             {
-                excep =
-                    axiom_element_get_text(exception_ele, env, exception_node);
+                excep = axiom_element_get_text(exception_ele, env, exception_node);
             }
             return excep;
         }
@@ -507,15 +480,14 @@
     axiom_node_t *fault_detail_entry_node = NULL;
     axiom_element_t *fault_detail_ele = NULL;
 
-
     AXIS2_PARAM_CHECK(env->error, exception, AXIS2_FAILURE);
 
     detail = axiom_soap_fault_get_detail(soap_fault, env);
 
-    if (!detail)
+    if(!detail)
     {
         detail = axiom_soap_fault_detail_create_with_parent(env, soap_fault);
-        if (!detail)
+        if(!detail)
         {
             return AXIS2_FAILURE;
         }
@@ -523,21 +495,18 @@
 
     /** create an om element with the exception enrty */
 
-    fault_detail_ele = axiom_element_create(env, NULL,
-                                            AXIOM_SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
-                                            NULL, &fault_detail_entry_node);
-    if (!fault_detail_ele)
+    fault_detail_ele = axiom_element_create(env, NULL, AXIOM_SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
+        NULL, &fault_detail_entry_node);
+    if(!fault_detail_ele)
     {
         return AXIS2_FAILURE;
     }
 
     /** set the exception string as a text node of newly created om element */
-    axiom_element_set_text(fault_detail_ele,
-                           env, exception, fault_detail_entry_node);
+    axiom_element_set_text(fault_detail_ele, env, exception, fault_detail_entry_node);
 
     /** now add this om element as a child of soap soap_fault detail om element node */
-    return axiom_soap_fault_detail_add_detail_entry(detail, env,
-                                                    fault_detail_entry_node);
+    return axiom_soap_fault_detail_add_detail_entry(detail, env, fault_detail_entry_node);
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -578,36 +547,34 @@
     AXIS2_PARAM_CHECK(env->error, reason_text, NULL);
 
     soap_fault = axiom_soap_fault_create_with_parent(env, parent);
-    if (!soap_fault)
+    if(!soap_fault)
     {
         return NULL;
     }
     fault_node = axiom_soap_fault_get_base_node(soap_fault, env);
-    if (!fault_node)
+    if(!fault_node)
     {
         axiom_soap_fault_free(soap_fault, env);
         return NULL;
     }
 
     soap_fault_code = axiom_soap_fault_code_create_with_parent(env, soap_fault);
-    if (!soap_fault_code)
+    if(!soap_fault_code)
     {
         axiom_soap_fault_free(soap_fault, env);
         axiom_node_free_tree(fault_node, env);
         return NULL;
     }
-    soap_fault_reason =
-        axiom_soap_fault_reason_create_with_parent(env, soap_fault);
-    if (!soap_fault_reason)
+    soap_fault_reason = axiom_soap_fault_reason_create_with_parent(env, soap_fault);
+    if(!soap_fault_reason)
     {
         axiom_soap_fault_free(soap_fault, env);
         axiom_node_free_tree(fault_node, env);
         return NULL;
     }
 
-    soap_fault_value =
-        axiom_soap_fault_value_create_with_code(env, soap_fault_code);
-    if (!soap_fault_value)
+    soap_fault_value = axiom_soap_fault_value_create_with_code(env, soap_fault_code);
+    if(!soap_fault_value)
     {
         axiom_soap_fault_free(soap_fault, env);
         axiom_node_free_tree(fault_node, env);
@@ -615,18 +582,16 @@
     }
 
     value_node = axiom_soap_fault_value_get_base_node(soap_fault_value, env);
-    if (!value_node)
+    if(!value_node)
     {
         return NULL;
     }
-    value_ele =
-        (axiom_element_t *) axiom_node_get_data_element(value_node, env);
+    value_ele = (axiom_element_t *)axiom_node_get_data_element(value_node, env);
 
     axiom_element_set_text(value_ele, env, code_value, value_node);
 
-    soap_fault_text =
-        axiom_soap_fault_text_create_with_parent(env, soap_fault_reason);
-    if (!soap_fault_text)
+    soap_fault_text = axiom_soap_fault_text_create_with_parent(env, soap_fault_reason);
+    if(!soap_fault_text)
     {
         axiom_soap_fault_free(soap_fault, env);
         axiom_node_free_tree(fault_node, env);
@@ -635,11 +600,11 @@
     axiom_soap_fault_text_set_lang(soap_fault_text, env, "en");
 
     text_node = axiom_soap_fault_text_get_base_node(soap_fault_text, env);
-    if (!text_node)
+    if(!text_node)
     {
         return NULL;
     }
-    text_ele = (axiom_element_t *) axiom_node_get_data_element(text_node, env);
+    text_ele = (axiom_element_t *)axiom_node_get_data_element(text_node, env);
 
     axiom_element_set_text(text_ele, env, reason_text, text_node);
 

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_code.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_code.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_code.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_code.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -41,15 +40,13 @@
     const axutil_env_t * env)
 {
     axiom_soap_fault_code_t *fault_code = NULL;
-    fault_code = (axiom_soap_fault_code_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (axiom_soap_fault_code_t));
+    fault_code = (axiom_soap_fault_code_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_code_t));
 
-    if (!fault_code)
+    if(!fault_code)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault code");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault code");
         return NULL;
     }
 
@@ -79,36 +76,33 @@
     AXIS2_PARAM_CHECK(env->error, fault, NULL);
 
     fault_code = axiom_soap_fault_code_create(env);
-    if (!fault_code)
+    if(!fault_code)
     {
         return NULL;
     }
 
     parent_node = axiom_soap_fault_get_base_node(fault, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_code_free(fault_code, env);
         return NULL;
     }
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
 
-    if (!parent_ele)
+    if(!parent_ele)
     {
         axiom_soap_fault_code_free(fault_code, env);
         return NULL;
     }
     fault_code->soap_version = axiom_soap_fault_get_soap_version(fault, env);
-    if (fault_code->soap_version == AXIOM_SOAP12)
+    if(fault_code->soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_CODE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_CODE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_code_free(fault_code, env);
         return NULL;
@@ -132,13 +126,13 @@
     AXIS2_PARAM_CHECK(env->error, value, NULL);
 
     fault_code = axiom_soap_fault_code_create_with_parent(env, fault);
-    if (!fault_code)
+    if(!fault_code)
     {
         return NULL;
     }
 
     fault_value = axiom_soap_fault_value_create_with_code(env, fault_code);
-    if (!fault_value)
+    if(!fault_value)
     {
         axiom_soap_fault_code_free(fault_code, env);
         return NULL;
@@ -153,11 +147,11 @@
     const axutil_env_t * env)
 {
 
-    if (fault_code->subcode)
+    if(fault_code->subcode)
     {
         axiom_soap_fault_sub_code_free(fault_code->subcode, env);
     }
-    if (fault_code->value)
+    if(fault_code->value)
     {
         axiom_soap_fault_value_free(fault_code->value, env);
     }
@@ -175,7 +169,7 @@
 
     AXIS2_PARAM_CHECK(env->error, fault_val, AXIS2_FAILURE);
 
-    if (!(fault_code->value))
+    if(!(fault_code->value))
     {
         fault_code->value = fault_val;
         return AXIS2_SUCCESS;
@@ -183,7 +177,7 @@
     else
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "trying to set fault value to fault code more than once");
+            "trying to set fault value to fault code more than once");
     }
     return AXIS2_FAILURE;
 }
@@ -196,7 +190,7 @@
 {
     AXIS2_PARAM_CHECK(env->error, fault_subcode, AXIS2_FAILURE);
 
-    if (!(fault_code->subcode))
+    if(!(fault_code->subcode))
     {
         fault_code->subcode = fault_subcode;
         return AXIS2_SUCCESS;
@@ -204,7 +198,7 @@
     else
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "trying to set fault subcode to fault code more than once ");
+            "trying to set fault subcode to fault code more than once ");
     }
     return AXIS2_FAILURE;
 }
@@ -216,17 +210,16 @@
 {
     int status = AXIS2_SUCCESS;
 
-    if (fault_code->subcode)
+    if(fault_code->subcode)
     {
         return fault_code->subcode;
     }
-    else if (fault_code->builder)
+    else if(fault_code->builder)
     {
-        while (!(fault_code->subcode) &&
-               !(axiom_node_is_complete(fault_code->om_ele_node, env)))
+        while(!(fault_code->subcode) && !(axiom_node_is_complete(fault_code->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(fault_code->builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -242,17 +235,16 @@
 {
     int status = AXIS2_SUCCESS;
 
-    if (fault_code->value)
+    if(fault_code->value)
     {
         return fault_code->value;
     }
-    else if (fault_code->builder)
+    else if(fault_code->builder)
     {
-        while (!(fault_code->value) &&
-               !(axiom_node_is_complete(fault_code->om_ele_node, env)))
+        while(!(fault_code->value) && !(axiom_node_is_complete(fault_code->om_ele_node, env)))
         {
             status = axiom_soap_builder_next(fault_code->builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -269,10 +261,9 @@
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE,
-                        AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_code->om_ele_node = node;

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_detail.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_detail.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_detail.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_detail.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,15 +31,12 @@
 {
     axiom_soap_fault_detail_t *fault_detail = NULL;
 
-
-    fault_detail = (axiom_soap_fault_detail_t *) AXIS2_MALLOC(env->allocator,
-                                                              sizeof
-                                                              (axiom_soap_fault_detail_t));
-    if (!fault_detail)
+    fault_detail = (axiom_soap_fault_detail_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_detail_t));
+    if(!fault_detail)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create a fault detail");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create a fault detail");
         return NULL;
     }
 
@@ -50,7 +46,7 @@
 }
 
 AXIS2_EXTERN axiom_soap_fault_detail_t *AXIS2_CALL
-    axiom_soap_fault_detail_create_with_parent(
+axiom_soap_fault_detail_create_with_parent(
     const axutil_env_t * env,
     axiom_soap_fault_t * fault)
 {
@@ -65,32 +61,29 @@
     AXIS2_PARAM_CHECK(env->error, fault, NULL);
 
     fault_detail = axiom_soap_fault_detail_create(env);
-    if (!fault_detail)
+    if(!fault_detail)
     {
         return NULL;
     }
     parent_node = axiom_soap_fault_get_base_node(fault, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         return NULL;
     }
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         return NULL;
     }
     soap_version = axiom_soap_fault_get_soap_version(fault, env);
-    if (soap_version == AXIOM_SOAP12)
+    if(soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_DETAIL_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_DETAIL_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_detail_free(fault_detail, env);
         return NULL;
@@ -109,17 +102,17 @@
     return;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_detail_add_detail_entry(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_detail_add_detail_entry(
     axiom_soap_fault_detail_t * fault_detail,
     const axutil_env_t * env,
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env,
-                        AXIS2_ERROR_OM_ELEMENT_EXPECTED, AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_OM_ELEMENT_EXPECTED, AXIS2_FAILURE);
 
         return AXIS2_FAILURE;
     }
@@ -129,32 +122,30 @@
 }
 
 AXIS2_EXTERN axiom_children_iterator_t *AXIS2_CALL
-    axiom_soap_fault_detail_get_all_detail_entries(
+axiom_soap_fault_detail_get_all_detail_entries(
     axiom_soap_fault_detail_t * fault_detail,
     const axutil_env_t * env)
 {
     axiom_element_t *om_ele = NULL;
-    if (fault_detail->om_ele_node)
+    if(fault_detail->om_ele_node)
     {
-        om_ele = (axiom_element_t *)
-            axiom_node_get_data_element(fault_detail->om_ele_node, env);
-        return axiom_element_get_children(om_ele, env,
-                                          fault_detail->om_ele_node);
+        om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_detail->om_ele_node, env);
+        return axiom_element_get_children(om_ele, env, fault_detail->om_ele_node);
     }
     return NULL;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_detail_set_base_node(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_detail_set_base_node(
     axiom_soap_fault_detail_t * fault_detail,
     const axutil_env_t * env,
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE,
-                        AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_detail->om_ele_node = node;

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_node.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_node.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_node.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,15 +31,13 @@
 {
     axiom_soap_fault_node_t *fault_node = NULL;
 
-    fault_node = (axiom_soap_fault_node_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (axiom_soap_fault_node_t));
+    fault_node = (axiom_soap_fault_node_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_node_t));
 
-    if (!fault_node)
+    if(!fault_node)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create a SOAP fault node");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create a SOAP fault node");
         return NULL;
     }
     fault_node->om_ele_node = NULL;
@@ -65,20 +62,19 @@
     AXIS2_PARAM_CHECK(env->error, fault, NULL);
 
     fault_node = axiom_soap_fault_node_create(env);
-    if (!fault_node)
+    if(!fault_node)
     {
         return NULL;
     }
     parent_node = axiom_soap_fault_get_base_node(fault, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_node_free(fault_node, env);
         return NULL;
     }
 
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         axiom_soap_fault_node_free(fault_node, env);
         return NULL;
@@ -86,12 +82,10 @@
 
     parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
 
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_NODE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_NODE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_node_free(fault_node, env);
         return NULL;
@@ -123,16 +117,13 @@
 
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
 
-    if (fault_node->om_ele_node)
+    if(fault_node->om_ele_node)
     {
-        om_ele =
-            (axiom_element_t *) axiom_node_get_data_element(fault_node->
-                                                            om_ele_node, env);
+        om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_node-> om_ele_node, env);
 
-        if (om_ele)
+        if(om_ele)
         {
-            return axiom_element_set_text(om_ele, env, uri,
-                                          fault_node->om_ele_node);
+            return axiom_element_set_text(om_ele, env, uri, fault_node->om_ele_node);
         }
     }
 
@@ -146,12 +137,10 @@
 {
     axiom_element_t *om_ele = NULL;
 
-    if (fault_node->om_ele_node)
+    if(fault_node->om_ele_node)
     {
-        om_ele =
-            (axiom_element_t *) axiom_node_get_data_element(fault_node->
-                                                            om_ele_node, env);
-        if (om_ele)
+        om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_node-> om_ele_node, env);
+        if(om_ele)
         {
             return axiom_element_get_text(om_ele, env, fault_node->om_ele_node);
         }
@@ -167,10 +156,9 @@
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env,
-                        AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
 

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_reason.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_reason.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_reason.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_reason.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -35,7 +34,8 @@
     int soap_version;
 };
 
-static axis2_bool_t axiom_soap_fault_reason_lang_exists(
+static axis2_bool_t
+axiom_soap_fault_reason_lang_exists(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env,
     axis2_char_t * lang);
@@ -45,21 +45,19 @@
     const axutil_env_t * env)
 {
     axiom_soap_fault_reason_t *fault_reason = NULL;
-    fault_reason = (axiom_soap_fault_reason_t *) AXIS2_MALLOC(env->allocator,
-                                                              sizeof
-                                                              (axiom_soap_fault_reason_t));
-    if (!fault_reason)
+    fault_reason = (axiom_soap_fault_reason_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_reason_t));
+    if(!fault_reason)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault reason");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault reason");
         return NULL;
     }
 
     fault_reason->om_ele_node = NULL;
     fault_reason->fault_texts = NULL;
-	fault_reason->soap_version = -1;
-	return fault_reason;
+    fault_reason->soap_version = -1;
+    return fault_reason;
 }
 
 AXIS2_EXTERN axiom_soap_fault_reason_t *AXIS2_CALL
@@ -77,31 +75,28 @@
     AXIS2_PARAM_CHECK(env->error, fault, NULL);
 
     fault_reason = axiom_soap_fault_reason_create(env);
-    if (!fault_reason)
+    if(!fault_reason)
     {
         return NULL;
     }
     parent_node = axiom_soap_fault_get_base_node(fault, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         return NULL;
     }
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         return NULL;
     }
     fault_reason->soap_version = axiom_soap_fault_get_soap_version(fault, env);
-    if (fault_reason->soap_version == AXIOM_SOAP12)
+    if(fault_reason->soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_REASON_LOCAL_NAME,
-                                    parent_ns, &this_node);
-    if (!this_ele)
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_REASON_LOCAL_NAME,
+        parent_ns, &this_node);
+    if(!this_ele)
     {
         return NULL;
     }
@@ -118,20 +113,20 @@
     const axutil_env_t * env)
 {
 
-    if (fault_reason->fault_texts)
+    if(fault_reason->fault_texts)
     {
         int size = 0;
         int i = 0;
         size = axutil_array_list_size(fault_reason->fault_texts, env);
 
-        for (i = 0; i < size; i++)
+        for(i = 0; i < size; i++)
         {
             axiom_soap_fault_text_t *fault_text = NULL;
             void *value = NULL;
             value = axutil_array_list_get(fault_reason->fault_texts, env, i);
-            if (value)
+            if(value)
             {
-                fault_text = (axiom_soap_fault_text_t *) value;
+                fault_text = (axiom_soap_fault_text_t *)value;
                 axiom_soap_fault_text_free(fault_text, env);
                 fault_text = NULL;
             }
@@ -148,7 +143,7 @@
 }
 
 AXIS2_EXTERN axiom_soap_fault_text_t *AXIS2_CALL
-    axiom_soap_fault_reason_get_soap_fault_text(
+axiom_soap_fault_reason_get_soap_fault_text(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env,
     axis2_char_t * lang)
@@ -158,22 +153,20 @@
     int i = 0;
 
     AXIS2_PARAM_CHECK(env->error, fault_reason, NULL);
-    if (!lang || (axutil_strcmp(lang, "") == 0))
+    if(!lang || (axutil_strcmp(lang, "") == 0))
     {
         return NULL;
     }
     /** Here we have to build the soap fault reason element completly */
-    if (!fault_reason->fault_texts)
+    if(!fault_reason->fault_texts)
     {
 
-        if (fault_reason->soap_builder &&
-            !(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+        if(fault_reason->soap_builder && !(axiom_node_is_complete(fault_reason->om_ele_node, env)))
         {
-            while (!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+            while(!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
             {
-                status =
-                    axiom_soap_builder_next(fault_reason->soap_builder, env);
-                if (status == AXIS2_FAILURE)
+                status = axiom_soap_builder_next(fault_reason->soap_builder, env);
+                if(status == AXIS2_FAILURE)
                 {
                     return NULL;
                 }
@@ -181,24 +174,24 @@
         }
     }
 
-    if (!fault_reason->fault_texts)
+    if(!fault_reason->fault_texts)
     {
         return NULL;
     }
     /** iterate the array list */
     size = axutil_array_list_size(fault_reason->fault_texts, env);
-    for (i = 0; i < size; i++)
+    for(i = 0; i < size; i++)
     {
         axiom_soap_fault_text_t *fault_text = NULL;
         void *value = NULL;
 
         value = axutil_array_list_get(fault_reason->fault_texts, env, i);
-        if (value)
+        if(value)
         {
             axis2_char_t *fault_lang = NULL;
-            fault_text = (axiom_soap_fault_text_t *) value;
+            fault_text = (axiom_soap_fault_text_t *)value;
             fault_lang = axiom_soap_fault_text_get_lang(fault_text, env);
-            if (fault_lang && axutil_strcmp(lang, fault_lang) == 0)
+            if(fault_lang && axutil_strcmp(lang, fault_lang) == 0)
             {
                 return fault_text;
             }
@@ -207,17 +200,17 @@
     return NULL;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_reason_set_base_node(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_reason_set_base_node(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env,
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env,
-                        AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_reason->om_ele_node = node;
@@ -245,21 +238,20 @@
 }
 
 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-    axiom_soap_fault_reason_get_all_soap_fault_texts(
+axiom_soap_fault_reason_get_all_soap_fault_texts(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
 
-    if (!(fault_reason->fault_texts) && (fault_reason->soap_builder))
+    if(!(fault_reason->fault_texts) && (fault_reason->soap_builder))
     {
-        if (!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+        if(!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
         {
-            while (!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+            while(!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
             {
-                status =
-                    axiom_soap_builder_next(fault_reason->soap_builder, env);
-                if (status == AXIS2_FAILURE)
+                status = axiom_soap_builder_next(fault_reason->soap_builder, env);
+                if(status == AXIS2_FAILURE)
                 {
                     return NULL;
                 }
@@ -270,53 +262,52 @@
 }
 
 AXIS2_EXTERN axiom_soap_fault_text_t *AXIS2_CALL
-    axiom_soap_fault_reason_get_first_soap_fault_text(
+axiom_soap_fault_reason_get_first_soap_fault_text(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
 
-    if (!(fault_reason->fault_texts) && (fault_reason->soap_builder))
+    if(!(fault_reason->fault_texts) && (fault_reason->soap_builder))
     {
-        if (!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+        if(!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
         {
-            while (!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
+            while(!(axiom_node_is_complete(fault_reason->om_ele_node, env)))
             {
-                status =
-                    axiom_soap_builder_next(fault_reason->soap_builder, env);
-                if (status == AXIS2_FAILURE)
+                status = axiom_soap_builder_next(fault_reason->soap_builder, env);
+                if(status == AXIS2_FAILURE)
                 {
                     return NULL;
                 }
             }
         }
     }
-    if (fault_reason->fault_texts)
+    if(fault_reason->fault_texts)
     {
         void *value = NULL;
         value = axutil_array_list_get(fault_reason->fault_texts, env, 0);
-        if (value)
+        if(value)
         {
-            return (axiom_soap_fault_text_t *) value;
+            return (axiom_soap_fault_text_t *)value;
         }
     }
     return NULL;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axiom_soap_fault_reason_add_soap_fault_text(
+axiom_soap_fault_reason_add_soap_fault_text(
     axiom_soap_fault_reason_t * fault_reason,
     const axutil_env_t * env,
     axiom_soap_fault_text_t * fault_text)
 {
-    if (!fault_text)
+    if(!fault_text)
     {
         return AXIS2_FAILURE;
     }
-    if (!(fault_reason->fault_texts))
+    if(!(fault_reason->fault_texts))
     {
         fault_reason->fault_texts = axutil_array_list_create(env, 1);
-        if (!fault_reason->fault_texts)
+        if(!fault_reason->fault_texts)
         {
             return AXIS2_FAILURE;
         }
@@ -327,11 +318,10 @@
         axis2_char_t *lang = NULL;
         axis2_bool_t is_exists = AXIS2_FALSE;
         lang = axiom_soap_fault_text_get_lang(fault_text, env);
-        if (lang)
+        if(lang)
         {
-            is_exists =
-                axiom_soap_fault_reason_lang_exists(fault_reason, env, lang);
-            if (is_exists == AXIS2_TRUE)
+            is_exists = axiom_soap_fault_reason_lang_exists(fault_reason, env, lang);
+            if(is_exists == AXIS2_TRUE)
             {
                 return AXIS2_FAILURE;
             }
@@ -351,23 +341,23 @@
     int size = 0;
     int i = 0;
 
-    if (!lang || (axutil_strcmp(lang, "") == 0) || !fault_reason->fault_texts)
+    if(!lang || (axutil_strcmp(lang, "") == 0) || !fault_reason->fault_texts)
     {
         return AXIS2_FALSE;
     }
     size = axutil_array_list_size(fault_reason->fault_texts, env);
-    for (i = 0; i < size; i++)
+    for(i = 0; i < size; i++)
     {
         axiom_soap_fault_text_t *fault_text = NULL;
         void *value = NULL;
         value = axutil_array_list_get(fault_reason->fault_texts, env, i);
-        if (value)
+        if(value)
         {
             axis2_char_t *text_lang = NULL;
-            fault_text = (axiom_soap_fault_text_t *) value;
+            fault_text = (axiom_soap_fault_text_t *)value;
 
             text_lang = axiom_soap_fault_text_get_lang(fault_text, env);
-            if (text_lang && (axutil_strcmp(lang, text_lang) == 0))
+            if(text_lang && (axutil_strcmp(lang, text_lang) == 0))
             {
                 return AXIS2_TRUE;
             }

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,15 +31,13 @@
 {
     axiom_soap_fault_role_t *fault_role = NULL;
 
-    fault_role = (axiom_soap_fault_role_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (axiom_soap_fault_role_t));
+    fault_role = (axiom_soap_fault_role_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_role_t));
 
-    if (!fault_role)
+    if(!fault_role)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault role");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault role");
         return NULL;
     }
 
@@ -68,35 +65,32 @@
     AXIS2_PARAM_CHECK(env->error, fault, NULL);
 
     fault_role = axiom_soap_fault_role_create(env);
-    if (!fault_role)
+    if(!fault_role)
     {
         return NULL;
     }
     parent_node = axiom_soap_fault_get_base_node(fault, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_role_free(fault_role, env);
         return NULL;
     }
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
 
-    if (!parent_ele)
+    if(!parent_ele)
     {
         axiom_soap_fault_role_free(fault_role, env);
         return NULL;
     }
     soap_version = axiom_soap_fault_get_soap_version(fault, env);
-    if (soap_version == AXIOM_SOAP12)
+    if(soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_ROLE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_ROLE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_role_free(fault_role, env);
         return NULL;
@@ -118,7 +112,8 @@
     return;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_role_set_role_value(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_role_set_role_value(
     axiom_soap_fault_role_t * fault_role,
     const axutil_env_t * env,
     axis2_char_t * uri)
@@ -127,17 +122,15 @@
 
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
 
-    if (!fault_role->om_ele_node)
+    if(!fault_role->om_ele_node)
     {
         return AXIS2_FAILURE;
     }
-    role_ele = (axiom_element_t *) axiom_node_get_data_element
-        (fault_role->om_ele_node, env);
+    role_ele = (axiom_element_t *)axiom_node_get_data_element(fault_role->om_ele_node, env);
 
-    if (role_ele)
+    if(role_ele)
     {
-        return axiom_element_set_text(role_ele, env, uri,
-                                      fault_role->om_ele_node);
+        return axiom_element_set_text(role_ele, env, uri, fault_role->om_ele_node);
     }
     return AXIS2_FAILURE;
 }
@@ -153,7 +146,7 @@
         return NULL;
     }
     role_ele = (axiom_element_t *) axiom_node_get_data_element
-        (fault_role->om_ele_node, env);
+    (fault_role->om_ele_node, env);
 
     if (role_ele)
     {
@@ -162,17 +155,17 @@
     return NULL;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_role_set_base_node(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_role_set_base_node(
     axiom_soap_fault_role_t * fault_role,
     const axutil_env_t * env,
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE,
-                        AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_role->om_ele_node = node;

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -41,15 +40,12 @@
 {
     axiom_soap_fault_sub_code_t *fault_sub_code = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    fault_sub_code =
-        (axiom_soap_fault_sub_code_t *) AXIS2_MALLOC(env->allocator,
-                                                     sizeof
-                                                     (axiom_soap_fault_sub_code_t));
-    if (!fault_sub_code)
+    fault_sub_code = (axiom_soap_fault_sub_code_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_sub_code_t));
+    if(!fault_sub_code)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault sub-code");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault sub-code");
         return NULL;
     }
 
@@ -76,38 +72,34 @@
     AXIS2_PARAM_CHECK(env->error, fault_code, NULL);
     fault_sub_code = axiom_soap_fault_sub_code_create(env);
 
-    if (!fault_sub_code)
+    if(!fault_sub_code)
     {
         return NULL;
     }
     parent_node = axiom_soap_fault_code_get_base_node(fault_code, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_sub_code_free(fault_sub_code, env);
         return NULL;
     }
 
-    parent_ele =
-        (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         axiom_soap_fault_sub_code_free(fault_sub_code, env);
         return NULL;
     }
-    fault_sub_code->soap_version =
-        axiom_soap_fault_code_get_soap_version(fault_code, env);
+    fault_sub_code->soap_version = axiom_soap_fault_code_get_soap_version(fault_code, env);
 
-    if (fault_sub_code->soap_version == AXIOM_SOAP12)
+    if(fault_sub_code->soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
 
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_SUB_CODE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_SUB_CODE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_sub_code_free(fault_sub_code, env);
         return NULL;
@@ -130,15 +122,13 @@
     axiom_soap_fault_value_t *fault_value = NULL;
     AXIS2_PARAM_CHECK(env->error, value, NULL);
 
-    fault_sub_code =
-        axiom_soap_fault_sub_code_create_with_parent(env, fault_code);
-    if (!fault_sub_code)
+    fault_sub_code = axiom_soap_fault_sub_code_create_with_parent(env, fault_code);
+    if(!fault_sub_code)
     {
         return NULL;
     }
-    fault_value =
-        axiom_soap_fault_value_create_with_subcode(env, fault_sub_code);
-    if (!fault_value)
+    fault_value = axiom_soap_fault_value_create_with_subcode(env, fault_sub_code);
+    if(!fault_value)
     {
         axiom_soap_fault_sub_code_free(fault_sub_code, env);
         return NULL;
@@ -153,12 +143,12 @@
     axiom_soap_fault_sub_code_t * fault_sub_code,
     const axutil_env_t * env)
 {
-    if (fault_sub_code->value)
+    if(fault_sub_code->value)
     {
         axiom_soap_fault_value_free(fault_sub_code->value, env);
         fault_sub_code->value = NULL;
     }
-    if (fault_sub_code->subcode)
+    if(fault_sub_code->subcode)
     {
         axiom_soap_fault_sub_code_free(fault_sub_code->subcode, env);
         fault_sub_code->subcode = NULL;
@@ -178,33 +168,31 @@
 {
     AXIS2_PARAM_CHECK(env->error, subcode, AXIS2_FAILURE);
 
-    if (!(fault_sub_code->subcode))
+    if(!(fault_sub_code->subcode))
     {
         fault_sub_code->subcode = subcode;
         return AXIS2_SUCCESS;
     }
     else
     {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "error tring to set fault subcode more than once");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "error tring to set fault subcode more than once");
     }
     return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axiom_soap_fault_value_t *AXIS2_CALL
-    axiom_soap_fault_sub_code_get_value(
+axiom_soap_fault_sub_code_get_value(
     axiom_soap_fault_sub_code_t * fault_sub_code,
     const axutil_env_t * env)
 {
     int status = AXIS2_SUCCESS;
 
-    if (fault_sub_code->builder)
+    if(fault_sub_code->builder)
     {
-        while (!(fault_sub_code->value) &&
-               !axiom_node_is_complete(fault_sub_code->om_ele_node, env))
+        while(!(fault_sub_code->value) && !axiom_node_is_complete(fault_sub_code->om_ele_node, env))
         {
             status = axiom_soap_builder_next(fault_sub_code->builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -213,14 +201,15 @@
     return fault_sub_code->value;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_sub_code_set_value(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_sub_code_set_value(
     axiom_soap_fault_sub_code_t * fault_sub_code,
     const axutil_env_t * env,
     axiom_soap_fault_value_t * fault_sub_code_val)
 {
     AXIS2_PARAM_CHECK(env->error, fault_sub_code_val, AXIS2_FAILURE);
 
-    if (!(fault_sub_code->value))
+    if(!(fault_sub_code->value))
     {
         fault_sub_code->value = fault_sub_code_val;
         return AXIS2_SUCCESS;
@@ -228,7 +217,7 @@
     else
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "error tring to set fault subcode value more than once");
+            "error tring to set fault subcode value more than once");
     }
     return AXIS2_FAILURE;
 }
@@ -240,14 +229,13 @@
 {
     int status = AXIS2_SUCCESS;
 
-
-    if (fault_sub_code->builder)
+    if(fault_sub_code->builder)
     {
-        while (!(fault_sub_code->subcode) &&
-               !axiom_node_is_complete(fault_sub_code->om_ele_node, env))
+        while(!(fault_sub_code->subcode) && !axiom_node_is_complete(fault_sub_code->om_ele_node,
+            env))
         {
             status = axiom_soap_builder_next(fault_sub_code->builder, env);
-            if (status == AXIS2_FAILURE)
+            if(status == AXIS2_FAILURE)
             {
                 break;
             }
@@ -256,17 +244,17 @@
     return fault_sub_code->subcode;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_soap_fault_sub_code_set_base_node(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_soap_fault_sub_code_set_base_node(
     axiom_soap_fault_sub_code_t * fault_sub_code,
     const axutil_env_t * env,
     axiom_node_t * node)
 {
     AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
 
-    if (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(node, env) != AXIOM_ELEMENT)
     {
-        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE,
-                        AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_sub_code->om_ele_node = node;

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -40,14 +39,12 @@
 {
     axiom_soap_fault_text_t *fault_text = NULL;
 
-    fault_text = (axiom_soap_fault_text_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (axiom_soap_fault_text_t));
-    if (!fault_text)
+    fault_text = (axiom_soap_fault_text_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_text_t));
+    if(!fault_text)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault text");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault text");
         return NULL;
     }
 
@@ -57,10 +54,10 @@
     fault_text->lang_ns_used = AXIS2_FALSE;
 
     fault_text->lang_namespace = axiom_namespace_create(env,
-                                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
-                                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
+        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
 
-    if (!(fault_text->lang_namespace))
+    if(!(fault_text->lang_namespace))
     {
         return NULL;
     }
@@ -75,7 +72,7 @@
 {
     axiom_soap_fault_text_t *fault_text = NULL;
     axiom_element_t *this_ele = NULL;
-	int soap_version = -1;
+    int soap_version = -1;
     axiom_node_t *this_node = NULL;
     axiom_namespace_t *parent_ns = NULL;
     axiom_node_t *parent_node = NULL;
@@ -85,37 +82,34 @@
 
     fault_text = axiom_soap_fault_text_create(env);
 
-    if (!fault_text)
+    if(!fault_text)
     {
         return NULL;
     }
 
     parent_node = axiom_soap_fault_reason_get_base_node(parent, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_text_free(fault_text, env);
         return NULL;
     }
 
-    parent_ele = (axiom_element_t *)
-        axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         axiom_soap_fault_text_free(fault_text, env);
         return NULL;
     }
-    
-	soap_version = axiom_soap_fault_reason_get_soap_version(parent, env);
-	if (AXIOM_SOAP12 == soap_version)
+
+    soap_version = axiom_soap_fault_reason_get_soap_version(parent, env);
+    if(AXIOM_SOAP12 == soap_version)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_TEXT_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_TEXT_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_text_free(fault_text, env);
         return NULL;
@@ -134,7 +128,7 @@
     const axutil_env_t * env)
 {
 
-    if (fault_text->lang_ns_used == AXIS2_FALSE && fault_text->lang_namespace)
+    if(fault_text->lang_ns_used == AXIS2_FALSE && fault_text->lang_namespace)
     {
         axiom_namespace_free(fault_text->lang_namespace, env);
         fault_text->lang_namespace = NULL;
@@ -155,13 +149,13 @@
 
     AXIS2_PARAM_CHECK(env->error, lang, AXIS2_FAILURE);
 
-    if (fault_text->lang_attribute)
+    if(fault_text->lang_attribute)
     {
         axis2_char_t *attr_lang = NULL;
         attr_lang = axiom_attribute_get_value(fault_text->lang_attribute, env);
-        if (attr_lang)
+        if(attr_lang)
         {
-            if (axutil_strcmp(attr_lang, lang) == 0)
+            if(axutil_strcmp(attr_lang, lang) == 0)
             {
 
                 /** this attribute already exists */
@@ -173,32 +167,26 @@
     }
 
     fault_text->lang_attribute = axiom_attribute_create(env,
-                                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
-                                                        lang,
-                                                        fault_text->
-                                                        lang_namespace);
-    if (!fault_text->lang_attribute)
+        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME, lang, fault_text-> lang_namespace);
+    if(!fault_text->lang_attribute)
     {
         return AXIS2_FAILURE;
     }
 
-    if (!fault_text->om_ele_node)
+    if(!fault_text->om_ele_node)
     {
         return AXIS2_FAILURE;
     }
-    om_ele =
-        (axiom_element_t *) axiom_node_get_data_element(fault_text->om_ele_node,
-                                                        env);
-    if (!om_ele)
+    om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_text->om_ele_node, env);
+    if(!om_ele)
     {
         return AXIS2_FAILURE;
     }
 
-    status =
-        axiom_element_add_attribute(om_ele, env, fault_text->lang_attribute,
-                                    fault_text->om_ele_node);
+    status = axiom_element_add_attribute(om_ele, env, fault_text->lang_attribute,
+        fault_text->om_ele_node);
 
-    if (status == AXIS2_SUCCESS)
+    if(status == AXIS2_SUCCESS)
     {
         fault_text->lang_ns_used = AXIS2_TRUE;
     }
@@ -218,30 +206,27 @@
     axiom_element_t *om_ele = NULL;
     axutil_qname_t *tmp_qname = NULL;
 
-    if (!fault_text->om_ele_node)
+    if(!fault_text->om_ele_node)
     {
         return NULL;
     }
-    om_ele = (axiom_element_t *)
-        axiom_node_get_data_element(fault_text->om_ele_node, env);
-    if (!om_ele)
+    om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_text->om_ele_node, env);
+    if(!om_ele)
     {
         return NULL;
     }
-    if (!(fault_text->lang_attribute))
+    if(!(fault_text->lang_attribute))
     {
 
         /* this logic need to be rechecked */
-        tmp_qname = axutil_qname_create(env,
-                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
-                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
-                                        AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
+        tmp_qname = axutil_qname_create(env, AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+            AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+            AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
 
-        fault_text->lang_attribute =
-            axiom_element_get_attribute(om_ele, env, tmp_qname);
+        fault_text->lang_attribute = axiom_element_get_attribute(om_ele, env, tmp_qname);
         axutil_qname_free(tmp_qname, env);
     }
-    if (fault_text->lang_attribute)
+    if(fault_text->lang_attribute)
     {
         return axiom_attribute_get_value(fault_text->lang_attribute, env);
     }
@@ -256,10 +241,9 @@
     axiom_node_t * node)
 {
 
-    if (node && (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT))
+    if(node && (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT))
     {
-        AXIS2_HANDLE_ERROR(env,
-                        AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     fault_text->om_ele_node = node;
@@ -283,16 +267,14 @@
 {
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
 
-    if (fault_text->om_ele_node)
+    if(fault_text->om_ele_node)
     {
         axiom_element_t *text_ele = NULL;
-        text_ele = (axiom_element_t *)
-            axiom_node_get_data_element(fault_text->om_ele_node, env);
-        if (text_ele)
+        text_ele = (axiom_element_t *)axiom_node_get_data_element(fault_text->om_ele_node, env);
+        if(text_ele)
         {
-            axiom_element_set_text(text_ele, env, value,
-                                   fault_text->om_ele_node);
-            if (lang)
+            axiom_element_set_text(text_ele, env, value, fault_text->om_ele_node);
+            if(lang)
             {
                 axiom_soap_fault_text_set_lang(fault_text, env, lang);
             }
@@ -309,15 +291,13 @@
 {
     axis2_char_t *text = NULL;
 
-    if (fault_text->om_ele_node)
+    if(fault_text->om_ele_node)
     {
         axiom_element_t *text_ele = NULL;
-        text_ele = (axiom_element_t *)
-            axiom_node_get_data_element(fault_text->om_ele_node, env);
-        if (text_ele)
+        text_ele = (axiom_element_t *)axiom_node_get_data_element(fault_text->om_ele_node, env);
+        if(text_ele)
         {
-            text = axiom_element_get_text(text_ele, env,
-                                          fault_text->om_ele_node);
+            text = axiom_element_get_text(text_ele, env, fault_text->om_ele_node);
             return text;
         }
     }

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -34,15 +33,13 @@
 {
     axiom_soap_fault_value_t *fault_value = NULL;
 
-    fault_value = (axiom_soap_fault_value_t *) AXIS2_MALLOC(env->allocator,
-                                                            sizeof
-                                                            (axiom_soap_fault_value_t));
+    fault_value = (axiom_soap_fault_value_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(axiom_soap_fault_value_t));
 
-    if (!fault_value)
+    if(!fault_value)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                          "No memory. Cannot create SOAP fault value");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory. Cannot create SOAP fault value");
         return NULL;
     }
 
@@ -69,39 +66,36 @@
 
     fault_value = axiom_soap_fault_value_create(env);
 
-    if (!fault_value)
+    if(!fault_value)
     {
         return NULL;
     }
 
     parent_node = axiom_soap_fault_sub_code_get_base_node(parent, env);
 
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
     }
 
-    parent_ele = (axiom_element_t *)
-        axiom_node_get_data_element(parent_node, env);
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
 
-    if (!parent_ele)
+    if(!parent_ele)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
     }
     soap_version = axiom_soap_fault_sub_code_get_soap_version(parent, env);
-    if (soap_version == AXIOM_SOAP12)
+    if(soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
 
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_VALUE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_VALUE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
@@ -131,35 +125,32 @@
 
     fault_value = axiom_soap_fault_value_create(env);
 
-    if (!fault_value)
+    if(!fault_value)
     {
         return NULL;
     }
 
     parent_node = axiom_soap_fault_code_get_base_node(parent, env);
-    if (!parent_node)
+    if(!parent_node)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
     }
-    parent_ele = (axiom_element_t *)
-        axiom_node_get_data_element(parent_node, env);
-    if (!parent_ele)
+    parent_ele = (axiom_element_t *)axiom_node_get_data_element(parent_node, env);
+    if(!parent_ele)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
     }
     soap_version = axiom_soap_fault_code_get_soap_version(parent, env);
-    if (soap_version == AXIOM_SOAP12)
+    if(soap_version == AXIOM_SOAP12)
     {
         parent_ns = axiom_element_get_namespace(parent_ele, env, parent_node);
     }
-    this_ele = axiom_element_create(env,
-                                    parent_node,
-                                    AXIOM_SOAP12_SOAP_FAULT_VALUE_LOCAL_NAME,
-                                    parent_ns, &this_node);
+    this_ele = axiom_element_create(env, parent_node, AXIOM_SOAP12_SOAP_FAULT_VALUE_LOCAL_NAME,
+        parent_ns, &this_node);
 
-    if (!this_ele)
+    if(!this_ele)
     {
         axiom_soap_fault_value_free(fault_value, env);
         return NULL;
@@ -187,10 +178,9 @@
     axiom_node_t * node)
 {
 
-    if (node && (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT))
+    if(node && (axiom_node_get_node_type(node, env) != AXIOM_ELEMENT))
     {
-        AXIS2_HANDLE_ERROR(env,
-                        AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_INVALID_BASE_TYPE, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
 
@@ -216,14 +206,13 @@
 
     value_node = axiom_soap_fault_value_get_base_node(fault_value, env);
 
-    if (!value_node)
+    if(!value_node)
     {
         return NULL;
     }
-    value_element =
-        (axiom_element_t *) axiom_node_get_data_element(value_node, env);
+    value_element = (axiom_element_t *)axiom_node_get_data_element(value_node, env);
 
-    if (!value_element)
+    if(!value_element)
     {
         return NULL;
     }
@@ -237,15 +226,12 @@
     axis2_char_t * text)
 {
     AXIS2_PARAM_CHECK(env->error, text, AXIS2_FAILURE);
-    if (fault_value->om_ele_node &&
-        axiom_node_get_node_type(fault_value->om_ele_node,
-                                 env) == AXIOM_ELEMENT)
+    if(fault_value->om_ele_node && axiom_node_get_node_type(fault_value->om_ele_node, env)
+        == AXIOM_ELEMENT)
     {
         axiom_element_t *om_ele = NULL;
-        om_ele = (axiom_element_t *)
-            axiom_node_get_data_element(fault_value->om_ele_node, env);
-        return axiom_element_set_text(om_ele, env, text,
-                                      fault_value->om_ele_node);
+        om_ele = (axiom_element_t *)axiom_node_get_data_element(fault_value->om_ele_node, env);
+        return axiom_element_set_text(om_ele, env, text, fault_value->om_ele_node);
     }
     return AXIS2_FAILURE;
 }



Mime
View raw message