axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r643841 - in /webservices/axis2/trunk/c/axiom/src/soap: soap_fault_role.c soap_fault_sub_code.c soap_fault_text.c soap_fault_value.c soap_header_block.c
Date Wed, 02 Apr 2008 10:52:34 GMT
Author: lahiru
Date: Wed Apr  2 03:52:28 2008
New Revision: 643841

URL: http://svn.apache.org/viewvc?rev=643841&view=rev
Log:
Hackathon:code improvements


Modified:
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_role.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_sub_code.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_text.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_fault_value.c
    webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c

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=643841&r1=643840&r2=643841&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 Wed Apr  2 03:52:28 2008
@@ -69,8 +69,9 @@
 
     fault_role = axiom_soap_fault_role_create(env);
     if (!fault_role)
+    {
         return NULL;
-
+    }
     parent_node = axiom_soap_fault_get_base_node(fault, env);
     if (!parent_node)
     {
@@ -127,8 +128,9 @@
     AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
 
     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);
 
@@ -147,8 +149,9 @@
     axiom_element_t *role_ele = NULL;
 
     if (!fault_role->om_ele_node)
+    {
         return NULL;
-
+    }
     role_ele = (axiom_element_t *) axiom_node_get_data_element
         (fault_role->om_ele_node, env);
 

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=643841&r1=643840&r2=643841&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 Wed Apr  2 03:52:28 2008
@@ -77,8 +77,9 @@
     fault_sub_code = axiom_soap_fault_sub_code_create(env);
 
     if (!fault_sub_code)
+    {
         return NULL;
-
+    }
     parent_node = axiom_soap_fault_code_get_base_node(fault_code, env);
     if (!parent_node)
     {
@@ -204,7 +205,9 @@
         {
             status = axiom_soap_builder_next(fault_sub_code->builder, env);
             if (status == AXIS2_FAILURE)
+            {
                 break;
+            }
         }
     }
     return fault_sub_code->value;
@@ -245,7 +248,9 @@
         {
             status = axiom_soap_builder_next(fault_sub_code->builder, env);
             if (status == AXIS2_FAILURE)
+            {
                 break;
+            }
         }
     }
     return fault_sub_code->subcode;

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=643841&r1=643840&r2=643841&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 Wed Apr  2 03:52:28 2008
@@ -61,7 +61,9 @@
                                                         AXIOM_SOAP12_SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
 
     if (!(fault_text->lang_namespace))
+    {
         return NULL;
+    }
 
     return fault_text;
 }
@@ -175,23 +177,30 @@
                                                         fault_text->
                                                         lang_namespace);
     if (!fault_text->lang_attribute)
+    {
         return AXIS2_FAILURE;
+    }
 
     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)
+    {
         return AXIS2_FAILURE;
+    }
 
     status =
         axiom_element_add_attribute(om_ele, env, fault_text->lang_attribute,
                                     fault_text->om_ele_node);
 
     if (status == AXIS2_SUCCESS)
+    {
         fault_text->lang_ns_used = AXIS2_TRUE;
+    }
     else
     {
         axiom_attribute_free(fault_text->lang_attribute, env);
@@ -209,13 +218,15 @@
     axutil_qname_t *tmp_qname = NULL;
 
     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)
+    {
         return NULL;
-
+    }
     if (!(fault_text->lang_attribute))
     {
 

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=643841&r1=643840&r2=643841&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 Wed Apr  2 03:52:28 2008
@@ -217,14 +217,16 @@
     value_node = axiom_soap_fault_value_get_base_node(fault_value, env);
 
     if (!value_node)
+    {
         return NULL;
-
+    }
     value_element =
         (axiom_element_t *) axiom_node_get_data_element(value_node, env);
 
     if (!value_element)
+    {
         return NULL;
-
+    }
     return axiom_element_get_text(value_element, env, value_node);
 }
 

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c?rev=643841&r1=643840&r2=643841&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_header_block.c Wed Apr  2 03:52:28 2008
@@ -72,12 +72,14 @@
 
     header_block = axiom_soap_header_block_create(env);
     if (!header_block)
+    {
         return NULL;
-
+    }
     parent_node = axiom_soap_header_get_base_node(header, env);
     if (!parent_node)
+    {
         return NULL;
-
+    }
     om_ele = axiom_element_create(env, parent_node, localname, ns, &this_node);
     if (!om_ele)
     {
@@ -113,7 +115,9 @@
     const axis2_char_t *attr_nsuri = NULL;
 
     if (header_block->soap_version == AXIOM_SOAP_VERSION_NOT_SET)
+    {
         return AXIS2_FAILURE;
+    }
     if (header_block->soap_version == AXIOM_SOAP11)
     {
         attr_localname = AXIOM_SOAP11_ATTR_ACTOR;
@@ -139,7 +143,9 @@
 
 
     if (header_block->soap_version == AXIOM_SOAP_VERSION_NOT_SET)
+    {
         return NULL;
+    }
     if (header_block->soap_version == AXIOM_SOAP11)
     {
         attr_localname = AXIOM_SOAP11_ATTR_ACTOR;
@@ -165,8 +171,9 @@
 
 
     if (header_block->soap_version == AXIOM_SOAP_VERSION_NOT_SET)
+    {
         return AXIS2_FAILURE;
-
+    }
     if (header_block->soap_version == AXIOM_SOAP11)
     {
         attr_nsuri = AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI;
@@ -200,8 +207,9 @@
     AXIS2_PARAM_CHECK(env->error, must_understand, AXIS2_FAILURE);
 
     if (header_block->soap_version == AXIOM_SOAP_VERSION_NOT_SET)
+    {
         return AXIS2_FAILURE;
-
+    }
     if (header_block->soap_version == AXIOM_SOAP11)
     {
         attr_nsuri = AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI;
@@ -243,7 +251,9 @@
     const axis2_char_t *attr_nsuri = NULL;
 
     if (header_block->soap_version == AXIOM_SOAP_VERSION_NOT_SET)
+    {
         return AXIS2_FAILURE;
+    }
     if (header_block->soap_version == AXIOM_SOAP11)
     {
         attr_nsuri = AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI;
@@ -257,8 +267,9 @@
                                                             AXIOM_SOAP_ATTR_MUST_UNDERSTAND,
                                                             attr_nsuri);
     if (!must_understand)
+    {
         return AXIS2_FALSE;
-
+    }
     if (axutil_strcmp(must_understand, AXIOM_SOAP_ATTR_MUST_UNDERSTAND_1) == 0
         || axutil_strcmp(must_understand,
                          AXIOM_SOAP_ATTR_MUST_UNDERSTAND_TRUE) == 0)
@@ -312,7 +323,9 @@
         }
         header_ns = axiom_element_get_namespace(header_ele, env, header_node);
         if (!header_ns)
+        {
             return AXIS2_FAILURE;
+        }
         prefix = axiom_namespace_get_prefix(header_ns, env);
     }
 
@@ -320,11 +333,13 @@
                              prefix);
 
     if (!qn)
+    {
         return AXIS2_FAILURE;
-
+    }
     if (!header_block->om_ele_node)
+    {
         return AXIS2_FAILURE;
-
+    }
     om_ele =
         (axiom_element_t *) axiom_node_get_data_element(header_block->
                                                         om_ele_node, env);
@@ -337,10 +352,11 @@
         return axiom_attribute_set_value(om_attr, env, attr_value);
     }
     if (soap_envelope_namespace_uri)
+    {
         om_ns = axiom_namespace_create(env,
                                        soap_envelope_namespace_uri,
                                        AXIOM_SOAP_DEFAULT_NAMESPACE_PREFIX);
-
+    }
     om_attr = axiom_attribute_create(env, attr_name, attr_value, om_ns);
     if (!om_attr && om_ns)
     {
@@ -385,19 +401,25 @@
         }
         header_ns = axiom_element_get_namespace(header_ele, env, header_node);
         if (!header_ns)
+        {
             return NULL;
+        }
         prefix = axiom_namespace_get_prefix(header_ns, env);
     }
     qn = axutil_qname_create(env, attr_name, soap_envelope_namespace_uri,
                              prefix);
     if (!qn)
+    {
         return NULL;
+    }
     om_ele =
         (axiom_element_t *) axiom_node_get_data_element(header_block->
                                                         om_ele_node, env);
     om_attr = axiom_element_get_attribute(om_ele, env, qn);
     if (om_attr)
+    {
         attr_value = axiom_attribute_get_value(om_attr, env);
+    }
     axutil_qname_free(qn, env);
     return attr_value;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message