axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r805352 [1/5] - in /webservices/axis2/trunk/c/neethi/src: ./ rmpolicy/ secpolicy/builder/ secpolicy/model/
Date Tue, 18 Aug 2009 10:45:18 GMT
Author: shankar
Date: Tue Aug 18 10:45:16 2009
New Revision: 805352

URL: http://svn.apache.org/viewvc?rev=805352&view=rev
Log:
formatting the code

Modified:
    webservices/axis2/trunk/c/neethi/src/assertion_builder.c
    webservices/axis2/trunk/c/neethi/src/engine.c
    webservices/axis2/trunk/c/neethi/src/exactlyone.c
    webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c
    webservices/axis2/trunk/c/neethi/src/policy.c
    webservices/axis2/trunk/c/neethi/src/registry.c
    webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c
    webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/algorithmsuite_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/bootstrap_policy_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/encryption_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/https_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/initiator_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/issued_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/layout_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/protection_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/rampart_config_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/recipient_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/saml_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/security_context_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/signature_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/signed_encrypted_parts_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/supporting_tokens_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/symmetric_binding_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/token_identifier.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/transport_binding_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/transport_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/trust10_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/username_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss10_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss11_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/x509_token_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/algorithmsuite.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/binding_commons.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/element.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/header.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/issued_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/layout.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/property.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/saml_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_items.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_parts.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/supporting_tokens.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_asymmetric_binding_commons.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/symmetric_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/token.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/transport_binding.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/trust10.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/ut.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss10.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/wss11.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/x509_token.c
    webservices/axis2/trunk/c/neethi/src/util.c

Modified: webservices/axis2/trunk/c/neethi/src/assertion_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/assertion_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/assertion_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/assertion_builder.c Tue Aug 18 10:45:16 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
@@ -38,16 +37,16 @@
     node_qname = axiom_element_get_qname(element, env, node);
     if(!node_qname)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[neethi] Cannot get qname from element %s.", localname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Cannot get qname from element %s.",
+            localname);
         return NULL;
     }
 
     ns = axutil_qname_get_uri(node_qname, env);
     if(!ns)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "[neethi] Cannot get namespace from element %s.", localname);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Cannot get namespace from element %s.",
+            localname);
         return NULL;
     }
 
@@ -135,7 +134,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY);
             return assertion;
         }
@@ -167,7 +166,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_REQUIRE_THUMBPRINT_REFERENCE);
             return assertion;
         }
@@ -259,7 +258,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER);
             return assertion;
         }
@@ -267,7 +266,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL);
             return assertion;
         }
@@ -283,7 +282,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN);
             return assertion;
         }
@@ -303,10 +302,10 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_REF_THUMBPRINT);
             return assertion;
-        }    
+        }
         else if(!axutil_strcmp(localname, RP_MUST_SUPPORT_REF_ENCRYPTED_KEY))
         {
             neethi_assertion_t *assertion = NULL;
@@ -340,7 +339,7 @@
             neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_SERVER_CHALLENGE);
             return assertion;
-        }        
+        }
 
         else if(!axutil_strcmp(localname, RP_REQUIRE_CLIENT_ENTROPY))
         {
@@ -362,7 +361,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_MUST_SUPPORT_ISSUED_TOKENS);
             return assertion;
         }
@@ -374,14 +373,14 @@
             if(!axutil_strcmp(ns, RP_SP_NS_11))
             {
                 /* derived key should be as defined in WS-SecConversation 1.0 */
-                neethi_assertion_set_value(
-                    assertion, env, NULL, ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC10);
+                neethi_assertion_set_value(assertion, env, NULL,
+                    ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC10);
             }
             else
             {
                 /* derived key should be as defined in WS-SecConversation 1.3 */
-                neethi_assertion_set_value(
-                    assertion, env, NULL, ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC13);
+                neethi_assertion_set_value(assertion, env, NULL,
+                    ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC13);
             }
             return assertion;
         }
@@ -396,7 +395,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_SC10_SECURITY_CONTEXT_TOKEN);
             return assertion;
         }
@@ -404,7 +403,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_SC13_SECURITY_CONTEXT_TOKEN);
             return assertion;
         }
@@ -422,7 +421,7 @@
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, 
+            neethi_assertion_set_value(assertion, env, NULL,
                 ASSERTION_TYPE_REQUIRE_EXTERNAL_REFERENCE);
             return assertion;
         }
@@ -491,13 +490,14 @@
         if(!axutil_strcmp(localname, AXIS2_OPTIMIZED_MIME_SERIALIZATION))
         {
             neethi_assertion_t *assertion = NULL;
-            assertion = neethi_assertion_create(env);  
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION) ;
-            return assertion;     
+            assertion = neethi_assertion_create(env);
+            neethi_assertion_set_value(assertion, env, NULL,
+                ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION);
+            return assertion;
         }
     }
-    else if((!axutil_strcmp(ns, AXIS2_RM_POLICY_10_NS))||
-        (!axutil_strcmp(ns, AXIS2_RM_POLICY_11_NS)))
+    else if((!axutil_strcmp(ns, AXIS2_RM_POLICY_10_NS)) || (!axutil_strcmp(ns,
+        AXIS2_RM_POLICY_11_NS)))
     {
         if(!axutil_strcmp(localname, AXIS2_RM_RMASSERTION))
         {
@@ -507,7 +507,7 @@
 
     /* This assertion cannot be processed */
     AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_UNKNOWN_ASSERTION, AXIS2_FAILURE);
-    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-        "[neethi] Unknown Assertion %s with namespace %s", localname, ns);
+    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Unknown Assertion %s with namespace %s",
+        localname, ns);
     return NULL;
 }

Modified: webservices/axis2/trunk/c/neethi/src/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/engine.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/engine.c (original)
+++ webservices/axis2/trunk/c/neethi/src/engine.c Tue Aug 18 10:45:16 2009
@@ -21,66 +21,77 @@
 
 /*Private functions*/
 
-static neethi_all_t *neethi_engine_get_operator_all(
+static neethi_all_t *
+neethi_engine_get_operator_all(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element);
 
-static neethi_exactlyone_t *neethi_engine_get_operator_exactlyone(
+static neethi_exactlyone_t *
+neethi_engine_get_operator_exactlyone(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element);
 
-static neethi_reference_t *neethi_engine_get_operator_reference(
+static neethi_reference_t *
+neethi_engine_get_operator_reference(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element);
 
-static neethi_policy_t *neethi_engine_get_operator_neethi_policy(
+static neethi_policy_t *
+neethi_engine_get_operator_neethi_policy(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element);
 
-static axis2_status_t neethi_engine_process_operation_element(
+static axis2_status_t
+neethi_engine_process_operation_element(
     const axutil_env_t *env,
     neethi_operator_t *neethi_operator,
     axiom_node_t *node,
     axiom_element_t *element);
 
-static axis2_status_t neethi_engine_add_policy_component(
+static axis2_status_t
+neethi_engine_add_policy_component(
     const axutil_env_t *env,
     neethi_operator_t *container_operator,
     neethi_operator_t *component);
 
-static axis2_bool_t neethi_engine_operator_is_empty(
+static axis2_bool_t
+neethi_engine_operator_is_empty(
     neethi_operator_t *operator,
     const axutil_env_t *env);
 
-static neethi_exactlyone_t *neethi_engine_compute_resultant_component(
+static neethi_exactlyone_t *
+neethi_engine_compute_resultant_component(
     axutil_array_list_t *normalized_inner_components,
     neethi_operator_type_t type,
     const axutil_env_t *env);
 
-static axutil_array_list_t *neethi_engine_operator_get_components(
+static axutil_array_list_t *
+neethi_engine_operator_get_components(
     neethi_operator_t *operator,
     const axutil_env_t *env);
 
-static neethi_exactlyone_t *neethi_engine_normalize_operator(
+static neethi_exactlyone_t *
+neethi_engine_normalize_operator(
     neethi_operator_t *operator,
     neethi_registry_t *registry,
     axis2_bool_t deep,
     const axutil_env_t *env);
 
-static neethi_exactlyone_t *neethi_engine_get_cross_product(
+static neethi_exactlyone_t *
+neethi_engine_get_cross_product(
     neethi_exactlyone_t *exactlyone1,
     neethi_exactlyone_t *exactlyone2,
     const axutil_env_t *env);
 
-static void neethi_engine_clear_element_attributes(
+static void
+neethi_engine_clear_element_attributes(
     axutil_hash_t *attr_hash,
     const axutil_env_t *env);
 
-
 /*Implementations*/
 
 /*This is the function which is called from outside*/
@@ -96,7 +107,8 @@
     return neethi_engine_get_operator_neethi_policy(env, node, element);
 }
 
-static neethi_all_t *neethi_engine_get_operator_all(
+static neethi_all_t *
+neethi_engine_get_operator_all(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element)
@@ -106,14 +118,14 @@
     axis2_status_t status = AXIS2_SUCCESS;
     all = neethi_all_create(env);
 
-    if (!all)
+    if(!all)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
         return NULL;
     }
     neethi_operator = neethi_operator_create(env);
-    if (!neethi_operator)
+    if(!neethi_operator)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -127,10 +139,9 @@
     neethi_operator_free(neethi_operator, env);
     neethi_operator = NULL;
 
-    if (status != AXIS2_SUCCESS)
+    if(status != AXIS2_SUCCESS)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] All creation failed");
         neethi_all_free(all, env);
         all = NULL;
@@ -139,7 +150,8 @@
     return all;
 }
 
-static neethi_exactlyone_t *neethi_engine_get_operator_exactlyone(
+static neethi_exactlyone_t *
+neethi_engine_get_operator_exactlyone(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element)
@@ -150,7 +162,7 @@
 
     exactlyone = neethi_exactlyone_create(env);
 
-    if (!exactlyone)
+    if(!exactlyone)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -158,28 +170,24 @@
         return NULL;
     }
     neethi_operator = neethi_operator_create(env);
-    if (!neethi_operator)
+    if(!neethi_operator)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
 
         return NULL;
     }
-    neethi_operator_set_value(neethi_operator, env, exactlyone,
-                              OPERATOR_TYPE_EXACTLYONE);
+    neethi_operator_set_value(neethi_operator, env, exactlyone, OPERATOR_TYPE_EXACTLYONE);
     status = neethi_engine_process_operation_element(env, neethi_operator, node, element);
 
     neethi_operator_set_value_null(neethi_operator, env);
     neethi_operator_free(neethi_operator, env);
     neethi_operator = NULL;
 
-    if (status != AXIS2_SUCCESS)
+    if(status != AXIS2_SUCCESS)
     {
-        AXIS2_ERROR_SET(env->error,
-                        AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] Exactlyone creation failed.");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Exactlyone creation failed.");
         neethi_exactlyone_free(exactlyone, env);
         exactlyone = NULL;
         return NULL;
@@ -188,7 +196,8 @@
     return exactlyone;
 }
 
-neethi_reference_t *neethi_engine_get_operator_reference(
+neethi_reference_t *
+neethi_engine_get_operator_reference(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element)
@@ -199,7 +208,7 @@
 
     reference = neethi_reference_create(env);
 
-    if (!reference)
+    if(!reference)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -208,13 +217,13 @@
     }
     qname = axutil_qname_create(env, NEETHI_URI, NULL, NULL);
 
-    if (!qname)
+    if(!qname)
     {
         return NULL;
     }
 
     attribute_value = axiom_element_get_attribute_value(element, env, qname);
-    if (attribute_value)
+    if(attribute_value)
     {
         neethi_reference_set_uri(reference, env, attribute_value);
     }
@@ -224,8 +233,8 @@
 /* This function will be called when we encounter a wsp:Policy
  * element */
 
-
-static neethi_policy_t *neethi_engine_get_operator_neethi_policy(
+static neethi_policy_t *
+neethi_engine_get_operator_neethi_policy(
     const axutil_env_t *env,
     axiom_node_t *node,
     axiom_element_t *element)
@@ -238,7 +247,7 @@
 
     neethi_policy = neethi_policy_create(env);
 
-    if (!neethi_policy)
+    if(!neethi_policy)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -248,14 +257,13 @@
     /* Then we wrap it in a neethi_operator */
 
     neethi_operator = neethi_operator_create(env);
-    if (!neethi_operator)
+    if(!neethi_operator)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
         return NULL;
     }
-    neethi_operator_set_value(neethi_operator, env, neethi_policy,
-                              OPERATOR_TYPE_POLICY);
+    neethi_operator_set_value(neethi_operator, env, neethi_policy, OPERATOR_TYPE_POLICY);
 
     /* This function will do all the processing and build the 
      * policy object model */
@@ -270,13 +278,11 @@
     neethi_operator_free(neethi_operator, env);
     neethi_operator = NULL;
 
-    if (status != AXIS2_SUCCESS)
+    if(status != AXIS2_SUCCESS)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED,
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED, AXIS2_FAILURE);
 
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] Policy creation failed.");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Policy creation failed.");
         neethi_policy_free(neethi_policy, env);
         neethi_policy = NULL;
         return NULL;
@@ -288,8 +294,8 @@
  * filling the component array_list inside the passing 
  * policy operator */
 
-
-static axis2_status_t neethi_engine_process_operation_element(
+static axis2_status_t
+neethi_engine_process_operation_element(
     const axutil_env_t *env,
     neethi_operator_t *neethi_operator,
     axiom_node_t *node,
@@ -305,54 +311,48 @@
     type = neethi_operator_get_type(neethi_operator, env);
     value = neethi_operator_get_value(neethi_operator, env);
 
-    if (type == OPERATOR_TYPE_POLICY)
+    if(type == OPERATOR_TYPE_POLICY)
     {
         /* wsp:Policy element can have any number of attributes
          * we will store them in a hash from the uri and localname */
 
-        axutil_hash_t *attributes = axiom_element_extract_attributes(
-            element, env, node);
+        axutil_hash_t *attributes = axiom_element_extract_attributes(element, env, node);
 
         if(attributes)
         {
-            axutil_hash_index_t *hi = NULL;            
-        
-            /* When creating the policy object we created the hash */        
-    
-            axutil_hash_t *ht = neethi_policy_get_attributes(
-                (neethi_policy_t *)value, env);
+            axutil_hash_index_t *hi = NULL;
+
+            /* When creating the policy object we created the hash */
+
+            axutil_hash_t *ht = neethi_policy_get_attributes((neethi_policy_t *)value, env);
 
             if(!ht)
             {
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                    "[neethi] Policy hash map creation failed.");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Policy hash map creation failed.");
                 return AXIS2_FAILURE;
             }
-            
 
-            for (hi = axutil_hash_first(attributes, env);
-                hi; hi = axutil_hash_next(env, hi))
+            for(hi = axutil_hash_first(attributes, env); hi; hi = axutil_hash_next(env, hi))
             {
                 axis2_char_t *key = NULL;
                 void *val = NULL;
                 axutil_qname_t *qname = NULL;
-                axis2_char_t *attr_val = NULL;    
+                axis2_char_t *attr_val = NULL;
                 axiom_namespace_t *ns = NULL;
                 axis2_char_t *ns_uri = NULL;
-                axiom_attribute_t *om_attr = NULL;                
-    
+                axiom_attribute_t *om_attr = NULL;
+
                 axutil_hash_this(hi, NULL, NULL, &val);
                 if(val)
                 {
-                    om_attr = (axiom_attribute_t *) val;
+                    om_attr = (axiom_attribute_t *)val;
                     ns = axiom_attribute_get_namespace(om_attr, env);
                     if(ns)
                     {
                         ns_uri = axiom_namespace_get_uri(ns, env);
                     }
 
-                    qname = axutil_qname_create(env, 
-                        axiom_attribute_get_localname(om_attr, env),
+                    qname = axutil_qname_create(env, axiom_attribute_get_localname(om_attr, env),
                         ns_uri, NULL);
                     if(qname)
                     {
@@ -363,15 +363,15 @@
                             if(attr_val)
                             {
                                 /* axutil_qname_free will free the returned key 
-                                 * of the qname so will duplicate it when storing */                                
+                                 * of the qname so will duplicate it when storing */
 
-                                axutil_hash_set(ht, axutil_strdup(env,key), AXIS2_HASH_KEY_STRING, 
+                                axutil_hash_set(ht, axutil_strdup(env, key), AXIS2_HASH_KEY_STRING,
                                     axutil_strdup(env, attr_val));
-                            }                                
-                        }   
-                        axutil_qname_free(qname, env);  
+                            }
+                        }
+                        axutil_qname_free(qname, env);
                     }
-                }    
+                }
             }
             /* axiom_element_extract_attributes method will always returns 
              * a cloned copy, so we need to free it after we have done with it */
@@ -382,155 +382,131 @@
     }
 
     children_iter = axiom_element_get_children(element, env, node);
-    if (children_iter)
+    if(children_iter)
     {
-        while (axiom_children_iterator_has_next(children_iter, env))
+        while(axiom_children_iterator_has_next(children_iter, env))
         {
             /* Extract the element and check the namespace. If the namespace 
              * is in ws_policy then we call the relevent operator builder 
              * otherwise we will call the assertion_builder */
 
-
             child_node = axiom_children_iterator_next(children_iter, env);
-            if (child_node)
+            if(child_node)
             {
-                if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+                if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
                 {
-                    child_element =
-                        (axiom_element_t *)
-                        axiom_node_get_data_element(child_node, env);
-                    if (child_element)
+                    child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+                    if(child_element)
                     {
                         axiom_namespace_t *namespace = NULL;
                         axis2_char_t *uri = NULL;
                         axis2_char_t *local_name = NULL;
                         neethi_operator_t *operator = NULL;
-                        local_name =
-                            axiom_element_get_localname(child_element, env);
+                        local_name = axiom_element_get_localname(child_element, env);
 
-                        namespace =
-                            axiom_element_get_namespace(child_element, env,
-                                                        child_node);
-                        if (!namespace)
+                        namespace = axiom_element_get_namespace(child_element, env, child_node);
+                        if(!namespace)
                         {
                             AXIS2_ERROR_SET(env->error,
-                                            AXIS2_ERROR_NEETHI_ELEMENT_WITH_NO_NAMESPACE,
-                                            AXIS2_FAILURE);
+                                AXIS2_ERROR_NEETHI_ELEMENT_WITH_NO_NAMESPACE, AXIS2_FAILURE);
                             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                            "[neethi] Element with no namespace");
+                                "[neethi] Element with no namespace");
                             return AXIS2_FAILURE;
                         }
                         uri = axiom_namespace_get_uri(namespace, env);
-                        if (!uri)
+                        if(!uri)
                         {
-                            AXIS2_ERROR_SET(env->error,
-                                            AXIS2_ERROR_INVALID_EMPTY_NAMESPACE_URI,
-                                            AXIS2_FAILURE);
+                            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_EMPTY_NAMESPACE_URI,
+                                AXIS2_FAILURE);
                             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                            "[neethi] Invalid Empty namespace uri.");
+                                "[neethi] Invalid Empty namespace uri.");
                             return AXIS2_FAILURE;
                         }
-                        if ((axutil_strcmp(uri, NEETHI_NAMESPACE) == 0) || 
-                            (axutil_strcmp(uri, NEETHI_POLICY_15_NAMESPACE) == 0))
+                        if((axutil_strcmp(uri, NEETHI_NAMESPACE) == 0) || (axutil_strcmp(uri,
+                            NEETHI_POLICY_15_NAMESPACE) == 0))
                         {
                             /* Looking at the localname we will call the relevent 
                              * operator function. After that the newly created 
                              * object is wrapped in a neethi_operator and stored in 
                              * the parent's component list */
 
-                            if (axutil_strcmp(local_name, NEETHI_POLICY) == 0)
+                            if(axutil_strcmp(local_name, NEETHI_POLICY) == 0)
                             {
                                 neethi_policy_t *neethi_policy = NULL;
-                                neethi_policy =
-                                    neethi_engine_get_operator_neethi_policy(env, child_node,
-                                                               child_element);
-                                if (neethi_policy)
+                                neethi_policy = neethi_engine_get_operator_neethi_policy(env,
+                                    child_node, child_element);
+                                if(neethi_policy)
                                 {
-                                    operator = neethi_operator_create(
-    env);
-                                    neethi_operator_set_value(operator, env,
-                                                              neethi_policy,
-                                                              OPERATOR_TYPE_POLICY);
-                                    neethi_engine_add_policy_component(env,
-                                                                       neethi_operator,
-                                                                       operator);
+                                    operator = neethi_operator_create(env);
+                                    neethi_operator_set_value(operator, env, neethi_policy,
+                                        OPERATOR_TYPE_POLICY);
+                                    neethi_engine_add_policy_component(env, neethi_operator,
+                                        operator);
                                 }
                                 else
                                 {
                                     AXIS2_ERROR_SET(env->error,
-                                                    AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED_FROM_ELEMENT,
-                                                    AXIS2_FAILURE);
+                                        AXIS2_ERROR_NEETHI_POLICY_CREATION_FAILED_FROM_ELEMENT,
+                                        AXIS2_FAILURE);
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                                    "[neethi] Policy creation failed from element.");
+                                        "[neethi] Policy creation failed from element.");
                                     return AXIS2_FAILURE;
                                 }
                             }
-                            else if (axutil_strcmp(local_name, NEETHI_ALL) == 0)
+                            else if(axutil_strcmp(local_name, NEETHI_ALL) == 0)
                             {
                                 neethi_all_t *all = NULL;
-                                all =
-                                    neethi_engine_get_operator_all(env, child_node,
-                                                     child_element);
-                                if (all)
+                                all
+                                    = neethi_engine_get_operator_all(env, child_node, child_element);
+                                if(all)
                                 {
-                                    operator = neethi_operator_create(
-    env);
-                                    neethi_operator_set_value(operator, env,
-                                                              all,
-                                                              OPERATOR_TYPE_ALL);
-                                    neethi_engine_add_policy_component(env,
-                                                                       neethi_operator,
-                                                                       operator);
+                                    operator = neethi_operator_create(env);
+                                    neethi_operator_set_value(operator, env, all, OPERATOR_TYPE_ALL);
+                                    neethi_engine_add_policy_component(env, neethi_operator,
+                                        operator);
                                 }
                                 else
                                 {
                                     AXIS2_ERROR_SET(env->error,
-                                                    AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED_FROM_ELEMENT,
-                                                    AXIS2_FAILURE);
+                                        AXIS2_ERROR_NEETHI_ALL_CREATION_FAILED_FROM_ELEMENT,
+                                        AXIS2_FAILURE);
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                                    "[neethi] All creation failed from element.");
+                                        "[neethi] All creation failed from element.");
                                     return AXIS2_FAILURE;
                                 }
                             }
-                            else if (axutil_strcmp
-                                     (local_name, NEETHI_EXACTLYONE) == 0)
+                            else if(axutil_strcmp(local_name, NEETHI_EXACTLYONE) == 0)
                             {
                                 neethi_exactlyone_t *exactlyone = NULL;
-                                exactlyone =
-                                    neethi_engine_get_operator_exactlyone(env, child_node,
-                                                            child_element);
-                                if (exactlyone)
+                                exactlyone = neethi_engine_get_operator_exactlyone(env, child_node,
+                                    child_element);
+                                if(exactlyone)
                                 {
-                                    operator = neethi_operator_create(
-    env);
-                                    neethi_operator_set_value(operator, env,
-                                                              exactlyone,
-                                                              OPERATOR_TYPE_EXACTLYONE);
-                                    neethi_engine_add_policy_component(env,
-                                                                       neethi_operator,
-                                                                       operator);
+                                    operator = neethi_operator_create(env);
+                                    neethi_operator_set_value(operator, env, exactlyone,
+                                        OPERATOR_TYPE_EXACTLYONE);
+                                    neethi_engine_add_policy_component(env, neethi_operator,
+                                        operator);
                                 }
                                 else
                                 {
                                     AXIS2_ERROR_SET(env->error,
-                                                    AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED_FROM_ELEMENT,
-                                                    AXIS2_FAILURE);
+                                        AXIS2_ERROR_NEETHI_EXACTLYONE_CREATION_FAILED_FROM_ELEMENT,
+                                        AXIS2_FAILURE);
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                                    "[neethi] Exactlyone creation failed from element.");
+                                        "[neethi] Exactlyone creation failed from element.");
                                     return AXIS2_FAILURE;
                                 }
                             }
-                            else if (axutil_strcmp(local_name, NEETHI_REFERENCE)
-                                     == 0)
+                            else if(axutil_strcmp(local_name, NEETHI_REFERENCE) == 0)
                             {
                                 neethi_reference_t *reference = NULL;
-                                reference =
-                                    neethi_engine_get_operator_reference(env, child_node,
-                                                           child_element);
-                                if (reference)
+                                reference = neethi_engine_get_operator_reference(env, child_node,
+                                    child_element);
+                                if(reference)
                                 {
                                     operator = neethi_operator_create(env);
-                                    neethi_operator_set_value(operator, env, reference, 
+                                    neethi_operator_set_value(operator, env, reference,
                                         OPERATOR_TYPE_REFERENCE);
                                     neethi_engine_add_policy_component(env, neethi_operator,
                                         operator);
@@ -538,10 +514,10 @@
                                 else
                                 {
                                     AXIS2_ERROR_SET(env->error,
-                                                    AXIS2_ERROR_NEETHI_REFERENCE_CREATION_FAILED_FROM_ELEMENT,
-                                                    AXIS2_FAILURE);
+                                        AXIS2_ERROR_NEETHI_REFERENCE_CREATION_FAILED_FROM_ELEMENT,
+                                        AXIS2_FAILURE);
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                                    "[neethi] Reference cretion failed from element.");
+                                        "[neethi] Reference cretion failed from element.");
                                     return AXIS2_FAILURE;
                                 }
                             }
@@ -552,25 +528,25 @@
                             /* This is an assertion in a different domain. Assertion builder
                              * should be called and that will call the relevent assertion builder 
                              * after looking at the localname and the namespace */
-                
+
                             neethi_assertion_t *assertion = NULL;
-                            assertion =
-                                neethi_assertion_builder_build(env, child_node, child_element);
-                            if (assertion)
+                            assertion = neethi_assertion_builder_build(env, child_node,
+                                child_element);
+                            if(assertion)
                             {
                                 operator = neethi_operator_create(env);
                                 neethi_operator_set_value(operator, env, assertion,
-                                                          OPERATOR_TYPE_ASSERTION);
+                                    OPERATOR_TYPE_ASSERTION);
                                 neethi_engine_add_policy_component(env, neethi_operator, operator);
                                 neethi_assertion_set_node(assertion, env, child_node);
                             }
                             else
                             {
                                 AXIS2_ERROR_SET(env->error,
-                                                AXIS2_ERROR_NEETHI_ASSERTION_CREATION_FAILED_FROM_ELEMENT,
-                                                AXIS2_FAILURE);
+                                    AXIS2_ERROR_NEETHI_ASSERTION_CREATION_FAILED_FROM_ELEMENT,
+                                    AXIS2_FAILURE);
                                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                                "[neethi] Assertion creation failed from element.");
+                                    "[neethi] Assertion creation failed from element.");
                                 return AXIS2_FAILURE;
                             }
                         }
@@ -584,12 +560,12 @@
         return AXIS2_FAILURE;
 }
 
-
 /* After looking at the operator_type this function will 
  * call the relevent neethi operator's add operator 
  * function */
 
-static axis2_status_t neethi_engine_add_policy_component(
+static axis2_status_t
+neethi_engine_add_policy_component(
     const axutil_env_t *env,
     neethi_operator_t *container_operator,
     neethi_operator_t *component)
@@ -605,36 +581,36 @@
     type = neethi_operator_get_type(container_operator, env);
     value = neethi_operator_get_value(container_operator, env);
 
-    if (value)
+    if(value)
     {
-        switch (type)
+        switch(type)
         {
-        case OPERATOR_TYPE_POLICY:
-            neethi_policy = (neethi_policy_t *) value;
-            neethi_policy_add_operator(neethi_policy, env, component);
-            break;
-
-        case OPERATOR_TYPE_ALL:
-            all = (neethi_all_t *) value;
-            neethi_all_add_operator(all, env, component);
-            break;
+            case OPERATOR_TYPE_POLICY:
+                neethi_policy = (neethi_policy_t *)value;
+                neethi_policy_add_operator(neethi_policy, env, component);
+                break;
+
+            case OPERATOR_TYPE_ALL:
+                all = (neethi_all_t *)value;
+                neethi_all_add_operator(all, env, component);
+                break;
+
+            case OPERATOR_TYPE_EXACTLYONE:
+                exactlyone = (neethi_exactlyone_t *)value;
+                neethi_exactlyone_add_operator(exactlyone, env, component);
+                break;
 
-        case OPERATOR_TYPE_EXACTLYONE:
-            exactlyone = (neethi_exactlyone_t *) value;
-            neethi_exactlyone_add_operator(exactlyone, env, component);
-            break;
+            case OPERATOR_TYPE_UNKNOWN:
+                return AXIS2_FAILURE;
+                break;
 
-        case OPERATOR_TYPE_UNKNOWN:
-            return AXIS2_FAILURE;
-            break;
-
-        case OPERATOR_TYPE_ASSERTION:
-            assertion = (neethi_assertion_t *) value;
-            neethi_assertion_add_operator(assertion, env, component);
-            break;
+            case OPERATOR_TYPE_ASSERTION:
+                assertion = (neethi_assertion_t *)value;
+                neethi_assertion_add_operator(assertion, env, component);
+                break;
 
-        case OPERATOR_TYPE_REFERENCE:
-            break;
+            case OPERATOR_TYPE_REFERENCE:
+                break;
         }
         return AXIS2_SUCCESS;
     }
@@ -657,16 +633,16 @@
 
     list = neethi_policy_get_policy_components(neethi_policy, env);
 
-    if (axutil_array_list_size(list, env) > 1)
+    if(axutil_array_list_size(list, env) > 1)
     {
         return;
     }
-    op = (neethi_operator_t *) axutil_array_list_get(list, env, 0);
+    op = (neethi_operator_t *)axutil_array_list_get(list, env, 0);
     type = neethi_operator_get_type(op, env);
-    if (type == OPERATOR_TYPE_EXACTLYONE)
+    if(type == OPERATOR_TYPE_EXACTLYONE)
     {
         void *value = neethi_operator_get_value(op, env);
-        if (value)
+        if(value)
         {
             return;
         }
@@ -680,18 +656,17 @@
 /************************************************/
 /*
 
-Following function will normalize accorading to the 
-WS-Policy spec. Normalize policy is in the following 
-format.
-
-<wsp:Policy>
-    <wsp:ExactlyOne>
-        ( <wsp:All> ( <Assertion …> … </Assertion> )* </wsp:All> )*
-   </wsp:ExactlyOne>
-</wsp:Policy> 
-
-*/
+ Following function will normalize accorading to the
+ WS-Policy spec. Normalize policy is in the following
+ format.
+
+ <wsp:Policy>
+ <wsp:ExactlyOne>
+ ( <wsp:All> ( <Assertion …> … </Assertion> )* </wsp:All> )*
+ </wsp:ExactlyOne>
+ </wsp:Policy>
 
+ */
 
 AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
 neethi_engine_get_normalize(
@@ -704,8 +679,6 @@
     return neethi_engine_normalize(env, neethi_policy, NULL, deep);
 }
 
-
-
 AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
 neethi_engine_normalize(
     const axutil_env_t *env,
@@ -724,7 +697,7 @@
      * created below */
 
     resultant_neethi_policy = neethi_policy_create(env);
-    if (!resultant_neethi_policy)
+    if(!resultant_neethi_policy)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -732,18 +705,18 @@
     }
 
     policy_name = neethi_policy_get_name(neethi_policy, env);
-    if (policy_name)
+    if(policy_name)
     {
         neethi_policy_set_name(resultant_neethi_policy, env, policy_name);
     }
     policy_id = neethi_policy_get_id(neethi_policy, env);
-    if (policy_id)
+    if(policy_id)
     {
         neethi_policy_set_id(resultant_neethi_policy, env, policy_id);
     }
 
     operator = neethi_operator_create(env);
-    if (!operator)
+    if(!operator)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -766,21 +739,18 @@
     /* This exactlyone is set as the first component of the 
      * normalized policy */
 
-    if (exactlyone)
+    if(exactlyone)
     {
         component = neethi_operator_create(env);
-        neethi_operator_set_value(component, env, exactlyone,
-                                  OPERATOR_TYPE_EXACTLYONE);
+        neethi_operator_set_value(component, env, exactlyone, OPERATOR_TYPE_EXACTLYONE);
         neethi_policy_add_operator(resultant_neethi_policy, env, component);
 
         return resultant_neethi_policy;
     }
     else
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NORMALIZATION_FAILED,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] Normalization failed.");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NORMALIZATION_FAILED, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Normalization failed.");
         return NULL;
     }
 }
@@ -801,41 +771,37 @@
     exactlyone1 = neethi_policy_get_exactlyone(neethi_policy1, env);
     exactlyone2 = neethi_policy_get_exactlyone(neethi_policy2, env);
 
-    if (!exactlyone1 || !exactlyone2)
+    if(!exactlyone1 || !exactlyone2)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_WRONG_INPUT_FOR_MERGE,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] Wrong input for merge.");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_WRONG_INPUT_FOR_MERGE, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Wrong input for merge.");
         return NULL;
     }
     exactlyone = neethi_engine_get_cross_product(exactlyone1, exactlyone2, env);
-    if (exactlyone)
+    if(exactlyone)
     {
         neethi_policy = neethi_policy_create(env);
         component = neethi_operator_create(env);
-        if (!neethi_policy || !component)
+        if(!neethi_policy || !component)
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
             return NULL;
         }
-        neethi_operator_set_value(component, env, exactlyone,
-                                  OPERATOR_TYPE_EXACTLYONE);
+        neethi_operator_set_value(component, env, exactlyone, OPERATOR_TYPE_EXACTLYONE);
         neethi_policy_add_operator(neethi_policy, env, component);
         return neethi_policy;
     }
     else
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_CROSS_PRODUCT_FAILED,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] Cross product failed.");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_CROSS_PRODUCT_FAILED, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Cross product failed.");
         return NULL;
     }
 }
 
-static axis2_bool_t neethi_engine_operator_is_empty(
+static axis2_bool_t
+neethi_engine_operator_is_empty(
     neethi_operator_t *operator,
     const axutil_env_t *env)
 {
@@ -850,36 +816,36 @@
     type = neethi_operator_get_type(operator, env);
     value = neethi_operator_get_value(operator, env);
 
-    if (value)
+    if(value)
     {
-        switch (type)
+        switch(type)
         {
-        case OPERATOR_TYPE_POLICY:
-            neethi_policy = (neethi_policy_t *) value;
-            return neethi_policy_is_empty(neethi_policy, env);
-            break;
-
-        case OPERATOR_TYPE_ALL:
-            all = (neethi_all_t *) value;
-            return neethi_all_is_empty(all, env);
-            break;
-
-        case OPERATOR_TYPE_EXACTLYONE:
-            exactlyone = (neethi_exactlyone_t *) value;
-            return neethi_exactlyone_is_empty(exactlyone, env);
-            break;
-
-        case OPERATOR_TYPE_UNKNOWN:
-            return AXIS2_FALSE;
-            break;
-
-        case OPERATOR_TYPE_ASSERTION:
-            assertion = (neethi_assertion_t *) value;
-            return neethi_assertion_is_empty(assertion, env);
-            break;
+            case OPERATOR_TYPE_POLICY:
+                neethi_policy = (neethi_policy_t *)value;
+                return neethi_policy_is_empty(neethi_policy, env);
+                break;
+
+            case OPERATOR_TYPE_ALL:
+                all = (neethi_all_t *)value;
+                return neethi_all_is_empty(all, env);
+                break;
+
+            case OPERATOR_TYPE_EXACTLYONE:
+                exactlyone = (neethi_exactlyone_t *)value;
+                return neethi_exactlyone_is_empty(exactlyone, env);
+                break;
+
+            case OPERATOR_TYPE_UNKNOWN:
+                return AXIS2_FALSE;
+                break;
+
+            case OPERATOR_TYPE_ASSERTION:
+                assertion = (neethi_assertion_t *)value;
+                return neethi_assertion_is_empty(assertion, env);
+                break;
 
-        case OPERATOR_TYPE_REFERENCE:
-            break;
+            case OPERATOR_TYPE_REFERENCE:
+                break;
 
         }
         return AXIS2_FALSE;
@@ -888,7 +854,8 @@
         return AXIS2_FALSE;
 }
 
-static axutil_array_list_t *neethi_engine_operator_get_components(
+static axutil_array_list_t *
+neethi_engine_operator_get_components(
     neethi_operator_t *operator,
     const axutil_env_t *env)
 {
@@ -903,43 +870,44 @@
     type = neethi_operator_get_type(operator, env);
     value = neethi_operator_get_value(operator, env);
 
-    if (value)
+    if(value)
     {
-        switch (type)
+        switch(type)
         {
-        case OPERATOR_TYPE_POLICY:
-            neethi_policy = (neethi_policy_t *) value;
-            return neethi_policy_get_policy_components(neethi_policy, env);
-            break;
-
-        case OPERATOR_TYPE_ALL:
-            all = (neethi_all_t *) value;
-            return neethi_all_get_policy_components(all, env);
-            break;
-
-        case OPERATOR_TYPE_EXACTLYONE:
-            exactlyone = (neethi_exactlyone_t *) value;
-            return neethi_exactlyone_get_policy_components(exactlyone, env);
-            break;
+            case OPERATOR_TYPE_POLICY:
+                neethi_policy = (neethi_policy_t *)value;
+                return neethi_policy_get_policy_components(neethi_policy, env);
+                break;
+
+            case OPERATOR_TYPE_ALL:
+                all = (neethi_all_t *)value;
+                return neethi_all_get_policy_components(all, env);
+                break;
+
+            case OPERATOR_TYPE_EXACTLYONE:
+                exactlyone = (neethi_exactlyone_t *)value;
+                return neethi_exactlyone_get_policy_components(exactlyone, env);
+                break;
 
-        case OPERATOR_TYPE_UNKNOWN:
-            return NULL;
-            break;
+            case OPERATOR_TYPE_UNKNOWN:
+                return NULL;
+                break;
 
-        case OPERATOR_TYPE_ASSERTION:
-            assertion = (neethi_assertion_t *) value;
-            return neethi_assertion_get_policy_components(assertion, env);
-            break;
+            case OPERATOR_TYPE_ASSERTION:
+                assertion = (neethi_assertion_t *)value;
+                return neethi_assertion_get_policy_components(assertion, env);
+                break;
 
-        case OPERATOR_TYPE_REFERENCE:
-            break;
+            case OPERATOR_TYPE_REFERENCE:
+                break;
         }
     }
 
     return NULL;
 }
 
-static neethi_exactlyone_t *neethi_engine_normalize_operator(
+static neethi_exactlyone_t *
+neethi_engine_normalize_operator(
     neethi_operator_t *operator,
     neethi_registry_t *registry,
     axis2_bool_t deep,
@@ -952,29 +920,28 @@
 
     neethi_operator_type_t type = neethi_operator_get_type(operator, env);
 
-    if (neethi_engine_operator_is_empty(operator, env))
+    if(neethi_engine_operator_is_empty(operator, env))
     {
         /* If this is an empty operator we just add 
          * an exactlyone and all */
 
         neethi_exactlyone_t *exactlyone = NULL;
         exactlyone = neethi_exactlyone_create(env);
-        if (!exactlyone)
+        if(!exactlyone)
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
             return NULL;
         }
-        if (type != OPERATOR_TYPE_EXACTLYONE)
+        if(type != OPERATOR_TYPE_EXACTLYONE)
         {
             neethi_all_t *all = NULL;
             neethi_operator_t *component = NULL;
             all = neethi_all_create(env);
             component = neethi_operator_create(env);
-            if (!all || !component)
+            if(!all || !component)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                 return NULL;
             }
@@ -989,17 +956,16 @@
 
     /* Here we are recursively normalize each and every component */
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
         neethi_operator_type_t component_type;
-        child_component =
-            (neethi_operator_t *) axutil_array_list_get(arraylist, env, i);
+        child_component = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
         component_type = neethi_operator_get_type(child_component, env);
 
-        if (component_type == OPERATOR_TYPE_ASSERTION)
+        if(component_type == OPERATOR_TYPE_ASSERTION)
         {
             /*Assertion normalization part comes here */
-            if (deep)
+            if(deep)
             {
                 return NULL;
             }
@@ -1013,10 +979,9 @@
                 all = neethi_all_create(env);
                 op = neethi_operator_create(env);
 
-                if (!all || !op || !exactlyone)
+                if(!all || !op || !exactlyone)
                 {
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                    AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                     return NULL;
                 }
@@ -1029,7 +994,7 @@
                 axutil_array_list_add(child_component_list, env, exactlyone);
             }
         }
-        else if (component_type == OPERATOR_TYPE_POLICY)
+        else if(component_type == OPERATOR_TYPE_POLICY)
         {
             neethi_policy_t *neethi_policy = NULL;
             neethi_all_t *all = NULL;
@@ -1038,54 +1003,46 @@
             neethi_exactlyone_t *exactlyone = NULL;
 
             all = neethi_all_create(env);
-            if (!all)
+            if(!all)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                 return NULL;
             }
-            neethi_policy =
-                (neethi_policy_t *) neethi_operator_get_value(child_component,
-                                                              env);
-            if (neethi_policy)
-            {
-                children =
-                    neethi_policy_get_policy_components(neethi_policy, env);
-                if (children)
+            neethi_policy = (neethi_policy_t *)neethi_operator_get_value(child_component, env);
+            if(neethi_policy)
+            {
+                children = neethi_policy_get_policy_components(neethi_policy, env);
+                if(children)
                 {
                     neethi_all_add_policy_components(all, children, env);
                     to_normalize = neethi_operator_create(env);
-                    if (!to_normalize)
+                    if(!to_normalize)
                     {
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                        AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                         return NULL;
                     }
-                    neethi_operator_set_value(to_normalize, env, all,
-                                              OPERATOR_TYPE_ALL);
-                    exactlyone =
-                        neethi_engine_normalize_operator(to_normalize, registry, deep, env);
-                    if (exactlyone)
+                    neethi_operator_set_value(to_normalize, env, all, OPERATOR_TYPE_ALL);
+                    exactlyone
+                        = neethi_engine_normalize_operator(to_normalize, registry, deep, env);
+                    if(exactlyone)
                     {
-                        axutil_array_list_add(child_component_list, env,
-                                              exactlyone);
+                        axutil_array_list_add(child_component_list, env, exactlyone);
                     }
                 }
                 else
                 {
-                    AXIS2_ERROR_SET(env->error,
-                                    AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS,
-                                    AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS,
+                        AXIS2_FAILURE);
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                    "[neethi] No children policy components");
+                        "[neethi] No children policy components");
                     return NULL;
                 }
             }
         }
 
-        else if (component_type == OPERATOR_TYPE_REFERENCE)
+        else if(component_type == OPERATOR_TYPE_REFERENCE)
         {
 
             /* If the operator is a policy reference we will 
@@ -1101,83 +1058,68 @@
             neethi_operator_t *to_normalize = NULL;
             neethi_exactlyone_t *exactlyone = NULL;
 
-            policy_ref =
-                (neethi_reference_t *)
-                neethi_operator_get_value(child_component, env);
+            policy_ref = (neethi_reference_t *)neethi_operator_get_value(child_component, env);
             uri = neethi_reference_get_uri(policy_ref, env);
-            if (!uri)
+            if(!uri)
             {
-                AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_URI_NOT_SPECIFIED,
-                                AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] Uri not specified");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_URI_NOT_SPECIFIED, AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Uri not specified");
                 return NULL;
             }
 
             if(!registry)
             {
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] Cannot resolve the reference.Registry Not provided");
+                    "[neethi] Cannot resolve the reference.Registry Not provided");
                 return NULL;
             }
 
             policy = neethi_registry_lookup(registry, env, uri);
-            if (!policy)
+            if(!policy)
             {
-                AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_NO_ENTRY_FOR_THE_GIVEN_URI,
-                                AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] No entry for the given uri");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NO_ENTRY_FOR_THE_GIVEN_URI,
+                    AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] No entry for the given uri");
                 return NULL;
             }
-            neethi_operator_set_value(child_component, env, policy,
-                                      OPERATOR_TYPE_POLICY);
+            neethi_operator_set_value(child_component, env, policy, OPERATOR_TYPE_POLICY);
 
             all = neethi_all_create(env);
-            if (!all)
+            if(!all)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                 return NULL;
             }
 
-            policy =
-                (neethi_policy_t *) neethi_operator_get_value(child_component,
-                                                              env);
-            if (policy)
+            policy = (neethi_policy_t *)neethi_operator_get_value(child_component, env);
+            if(policy)
             {
                 children = neethi_policy_get_policy_components(policy, env);
-                if (children)
+                if(children)
                 {
                     neethi_all_add_policy_components(all, children, env);
                     to_normalize = neethi_operator_create(env);
-                    if (!to_normalize)
+                    if(!to_normalize)
                     {
-                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                        AXIS2_FAILURE);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                         return NULL;
                     }
-                    neethi_operator_set_value(to_normalize, env, all,
-                                              OPERATOR_TYPE_ALL);
-                    exactlyone =
-                        neethi_engine_normalize_operator(to_normalize, registry, deep, env);
-                    if (exactlyone)
+                    neethi_operator_set_value(to_normalize, env, all, OPERATOR_TYPE_ALL);
+                    exactlyone
+                        = neethi_engine_normalize_operator(to_normalize, registry, deep, env);
+                    if(exactlyone)
                     {
-                        axutil_array_list_add(child_component_list, env,
-                                              exactlyone);
+                        axutil_array_list_add(child_component_list, env, exactlyone);
                     }
                 }
                 else
                 {
-                    AXIS2_ERROR_SET(env->error,
-                                    AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS,
-                                    AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS,
+                        AXIS2_FAILURE);
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                    "[neethi] No children policy components");
+                        "[neethi] No children policy components");
                     return NULL;
                 }
             }
@@ -1185,9 +1127,8 @@
         else
         {
             neethi_exactlyone_t *exactlyone = NULL;
-            exactlyone =
-                neethi_engine_normalize_operator(child_component, registry, deep, env);
-            if (exactlyone)
+            exactlyone = neethi_engine_normalize_operator(child_component, registry, deep, env);
+            if(exactlyone)
             {
                 axutil_array_list_add(child_component_list, env, exactlyone);
             }
@@ -1203,8 +1144,8 @@
 /* This function will return a single exactlyone from all the 
  * components in the list */
 
-
-static neethi_exactlyone_t *neethi_engine_compute_resultant_component(
+static neethi_exactlyone_t *
+neethi_engine_compute_resultant_component(
     axutil_array_list_t * normalized_inner_components,
     neethi_operator_type_t type,
     const axutil_env_t * env)
@@ -1217,7 +1158,7 @@
         size = axutil_array_list_size(normalized_inner_components, env);
     }
 
-    if (type == OPERATOR_TYPE_EXACTLYONE)
+    if(type == OPERATOR_TYPE_EXACTLYONE)
     {
         /* If the operator is an exactlyone then we get all the components
          * in the exatlyones and add them to a newly created exactlyone */
@@ -1226,70 +1167,65 @@
         neethi_exactlyone_t *inner_exactlyone = NULL;
         exactlyone = neethi_exactlyone_create(env);
 
-        for (i = 0; i < size; i++)
+        for(i = 0; i < size; i++)
         {
-            inner_exactlyone =
-                (neethi_exactlyone_t *)
-                axutil_array_list_get(normalized_inner_components, env, i);
-            if (inner_exactlyone)
+            inner_exactlyone = (neethi_exactlyone_t *)axutil_array_list_get(
+                normalized_inner_components, env, i);
+            if(inner_exactlyone)
             {
                 neethi_exactlyone_add_policy_components(exactlyone,
-                                                        neethi_exactlyone_get_policy_components
-                                                        (inner_exactlyone, env),
-                                                        env);
+                    neethi_exactlyone_get_policy_components(inner_exactlyone, env), env);
             }
             else
             {
                 AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY,
-                                AXIS2_FAILURE);
+                    AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] Exactlyone not found in normalized policy");
+                    "[neethi] Exactlyone not found in normalized policy");
                 return NULL;
             }
         }
     }
-    else if (type == OPERATOR_TYPE_POLICY || type == OPERATOR_TYPE_ALL)
+    else if(type == OPERATOR_TYPE_POLICY || type == OPERATOR_TYPE_ALL)
     {
         /* Here arry_list contains one exactlyone means this operator 
          * is already normalized. So we will return that. Otherwise we 
          * will get the crossproduct. */
 
-        if (size > 1)
+        if(size > 1)
         {
             /* Get the first one and do the cross product with other 
              * components */
 
             int i = 0;
-            exactlyone = (neethi_exactlyone_t *)axutil_array_list_get
-                (normalized_inner_components, env, 0);
-            if (!exactlyone)
+            exactlyone = (neethi_exactlyone_t *)axutil_array_list_get(normalized_inner_components,
+                env, 0);
+            if(!exactlyone)
             {
                 AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY,
-                                AXIS2_FAILURE);
+                    AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] Exactlyone not found in normalized policy");
+                    "[neethi] Exactlyone not found in normalized policy");
                 return NULL;
             }
-            if (!neethi_exactlyone_is_empty(exactlyone, env))
+            if(!neethi_exactlyone_is_empty(exactlyone, env))
             {
                 neethi_exactlyone_t *current_exactlyone = NULL;
                 i = 1;
-                for (i = 1; i < size; i++)
+                for(i = 1; i < size; i++)
                 {
-                    current_exactlyone = (neethi_exactlyone_t *)
-                        axutil_array_list_get(normalized_inner_components, env, i);
-                    if (!current_exactlyone)
+                    current_exactlyone = (neethi_exactlyone_t *)axutil_array_list_get(
+                        normalized_inner_components, env, i);
+                    if(!current_exactlyone)
                     {
                         AXIS2_ERROR_SET(env->error,
-                                        AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY,
-                                        AXIS2_FAILURE);
+                            AXIS2_ERROR_NEETHI_EXACTLYONE_NOT_FOUND_IN_NORMALIZED_POLICY,
+                            AXIS2_FAILURE);
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                        "[neethi] Exactlyone not found in normalized policy");
+                            "[neethi] Exactlyone not found in normalized policy");
                         return NULL;
                     }
-                    if (neethi_exactlyone_is_empty(current_exactlyone, env))
+                    if(neethi_exactlyone_is_empty(current_exactlyone, env))
                     {
                         exactlyone = current_exactlyone;
                         break;
@@ -1300,8 +1236,8 @@
                         neethi_exactlyone_t *temp1 = NULL;
                         temp = exactlyone;
                         temp1 = current_exactlyone;
-                        exactlyone = neethi_engine_get_cross_product(
-                            exactlyone, current_exactlyone, env);
+                        exactlyone = neethi_engine_get_cross_product(exactlyone,
+                            current_exactlyone, env);
                         neethi_exactlyone_free(temp, env);
                         neethi_exactlyone_free(temp1, env);
                         temp = NULL;
@@ -1311,18 +1247,15 @@
             }
             else
             {
-                AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_EXACTLYONE_IS_EMPTY,
-                                AXIS2_FAILURE);
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] Exactlyone is Empty");
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_EXACTLYONE_IS_EMPTY, AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] Exactlyone is Empty");
                 return NULL;
             }
         }
         else
         {
-            exactlyone = (neethi_exactlyone_t *)axutil_array_list_get(
-                normalized_inner_components, env, 0);
+            exactlyone = (neethi_exactlyone_t *)axutil_array_list_get(normalized_inner_components,
+                env, 0);
         }
     }
     axutil_array_list_free(normalized_inner_components, env);
@@ -1334,8 +1267,8 @@
 /* The cross product will return all the different combinations 
  * of alternatives and put them into one exactlyone */
 
-
-static neethi_exactlyone_t *neethi_engine_get_cross_product(
+static neethi_exactlyone_t *
+neethi_engine_get_cross_product(
     neethi_exactlyone_t *exactlyone1,
     neethi_exactlyone_t *exactlyone2,
     const axutil_env_t *env)
@@ -1351,7 +1284,7 @@
     int j = 0;
 
     cross_product = neethi_exactlyone_create(env);
-    if (!cross_product)
+    if(!cross_product)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -1360,72 +1293,62 @@
     array_list1 = neethi_exactlyone_get_policy_components(exactlyone1, env);
     array_list2 = neethi_exactlyone_get_policy_components(exactlyone2, env);
 
-    if (!array_list1 || !array_list2)
+    if(!array_list1 || !array_list2)
     {
-        AXIS2_ERROR_SET(env->error,
-                        AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                        "[neethi] No children policy components");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_NO_CHILDREN_POLICY_COMPONENTS, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[neethi] No children policy components");
         return NULL;
     }
 
-    for (i = 0; i < axutil_array_list_size(array_list1, env); i++)
+    for(i = 0; i < axutil_array_list_size(array_list1, env); i++)
     {
-        current_all1 = (neethi_all_t *) neethi_operator_get_value(
-            (neethi_operator_t *) axutil_array_list_get(array_list1, env, i), env);
+        current_all1 = (neethi_all_t *)neethi_operator_get_value(
+            (neethi_operator_t *)axutil_array_list_get(array_list1, env, i), env);
 
-        if (!current_all1)
+        if(!current_all1)
         {
             AXIS2_ERROR_SET(env->error,
-                            AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT,
-                            AXIS2_FAILURE);
+                AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                            "[neethi] All not found while getting cross product");
+                "[neethi] All not found while getting cross product");
             return NULL;
         }
 
-        for (j = 0; j < axutil_array_list_size(array_list2, env); j++)
+        for(j = 0; j < axutil_array_list_size(array_list2, env); j++)
         {
-            current_all2 = (neethi_all_t *) neethi_operator_get_value(
-                (neethi_operator_t *) axutil_array_list_get(array_list2, env, j), env);
+            current_all2 = (neethi_all_t *)neethi_operator_get_value(
+                (neethi_operator_t *)axutil_array_list_get(array_list2, env, j), env);
 
-            if (!current_all2)
+            if(!current_all2)
             {
                 AXIS2_ERROR_SET(env->error,
-                                AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT,
-                                AXIS2_FAILURE);
+                    AXIS2_ERROR_NEETHI_ALL_NOT_FOUND_WHILE_GETTING_CROSS_PRODUCT, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                                "[neethi] All not found while getting cross product");
+                    "[neethi] All not found while getting cross product");
                 return NULL;
             }
 
             cross_product_all = neethi_all_create(env);
-            if (!cross_product_all)
+            if(!cross_product_all)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                 return NULL;
             }
-            neethi_all_add_policy_components(cross_product_all,
-                                             neethi_all_get_policy_components
-                                             (current_all1, env), env);
-
-            neethi_all_add_policy_components(cross_product_all,
-                                             neethi_all_get_policy_components
-                                             (current_all2, env), env);
+            neethi_all_add_policy_components(cross_product_all, neethi_all_get_policy_components(
+                current_all1, env), env);
+
+            neethi_all_add_policy_components(cross_product_all, neethi_all_get_policy_components(
+                current_all2, env), env);
 
             component = neethi_operator_create(env);
-            if (!component)
+            if(!component)
             {
-                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
-                                AXIS2_FAILURE);
+                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
                 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
                 return NULL;
             }
-            neethi_operator_set_value(component, env, cross_product_all,
-                                      OPERATOR_TYPE_ALL);
+            neethi_operator_set_value(component, env, cross_product_all, OPERATOR_TYPE_ALL);
             neethi_exactlyone_add_operator(cross_product, env, component);
         }
     }
@@ -1443,7 +1366,8 @@
     return neethi_policy_serialize(policy, NULL, env);
 }
 
-static void neethi_engine_clear_element_attributes(
+static void
+neethi_engine_clear_element_attributes(
     axutil_hash_t *attr_hash,
     const axutil_env_t *env)
 {
@@ -1453,7 +1377,7 @@
     {
         void *val = NULL;
         axutil_hash_this(hi, NULL, NULL, &val);
-        if (val)
+        if(val)
         {
             axiom_attribute_free((axiom_attribute_t *)val, env);
             val = NULL;

Modified: webservices/axis2/trunk/c/neethi/src/exactlyone.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/exactlyone.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/exactlyone.c (original)
+++ webservices/axis2/trunk/c/neethi/src/exactlyone.c Tue Aug 18 10:45:16 2009
@@ -176,8 +176,9 @@
                 status = neethi_operator_serialize(operator, env, exactlyone_node);
                 if(status != AXIS2_SUCCESS)
                 {
-                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Neethi operator serialization failed. "
-                        "Cannot serialize 'ExactlyOne' assertion");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "Neethi operator serialization failed. "
+                            "Cannot serialize 'ExactlyOne' assertion");
                     return AXIS2_FAILURE;
                 }
             }

Modified: webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c (original)
+++ webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c Tue Aug 18 10:45:16 2009
@@ -46,29 +46,26 @@
         alternatives = neethi_policy_get_alternatives(normalized_policy, env);
     }
 
-    component =
-        (neethi_operator_t *) axutil_array_list_get(alternatives, env, 0);
-    all = (neethi_all_t *) neethi_operator_get_value(component, env);
+    component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+    all = (neethi_all_t *)neethi_operator_get_value(component, env);
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         value = neethi_assertion_get_value(assertion, env);
         type = neethi_assertion_get_type(assertion, env);
 
         /*if (value)
-        {*/
-            if (type == ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION)
-            {
-                neethi_policy_free(normalized_policy, env);
-                normalized_policy = NULL;
-                return AXIS2_TRUE;
-            }
+         {*/
+        if(type == ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION)
+        {
+            neethi_policy_free(normalized_policy, env);
+            normalized_policy = NULL;
+            return AXIS2_TRUE;
+        }
         /*}*/
     }
     neethi_policy_free(normalized_policy, env);

Modified: webservices/axis2/trunk/c/neethi/src/policy.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/policy.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/policy.c (original)
+++ webservices/axis2/trunk/c/neethi/src/policy.c Tue Aug 18 10:45:16 2009
@@ -37,7 +37,6 @@
     axutil_hash_t *attributes,
     const axutil_env_t *env);
 
-
 /* Creates a neethi_policy object */
 AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
 neethi_policy_create(
@@ -325,7 +324,6 @@
     }
 }
 
-
 /* When we encounter an attribute with wsu:Id we will store it in the hash. We are not
  * considering the prefix. Just the namespace and the local_name. */
 AXIS2_EXTERN axis2_status_t AXIS2_CALL

Modified: webservices/axis2/trunk/c/neethi/src/registry.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/registry.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/registry.c (original)
+++ webservices/axis2/trunk/c/neethi/src/registry.c Tue Aug 18 10:45:16 2009
@@ -31,11 +31,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    neethi_registry = (neethi_registry_t *) AXIS2_MALLOC(env->allocator,
-                                                         sizeof
-                                                         (neethi_registry_t));
+    neethi_registry = (neethi_registry_t *)AXIS2_MALLOC(env->allocator, sizeof(neethi_registry_t));
 
-    if (neethi_registry == NULL)
+    if(neethi_registry == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -44,7 +42,7 @@
     neethi_registry->registry = NULL;
 
     neethi_registry->registry = axutil_hash_make(env);
-    if (!(neethi_registry->registry))
+    if(!(neethi_registry->registry))
     {
         neethi_registry_free(neethi_registry, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -64,7 +62,7 @@
     neethi_registry_t *neethi_registry = NULL;
 
     neethi_registry = neethi_registry_create(env);
-    if (!neethi_registry)
+    if(!neethi_registry)
         return NULL;
 
     neethi_registry->parent = parent;
@@ -76,17 +74,17 @@
     neethi_registry_t *neethi_registry,
     const axutil_env_t *env)
 {
-    if (neethi_registry->registry)
+    if(neethi_registry->registry)
     {
         axutil_hash_index_t *hi = NULL;
         void *val = NULL;
-        for (hi = axutil_hash_first(neethi_registry->registry, env); hi;
-             hi = axutil_hash_next(env, hi))
+        for(hi = axutil_hash_first(neethi_registry->registry, env); hi; hi = axutil_hash_next(env,
+            hi))
         {
             neethi_policy_t *neethi_policy = NULL;
             axutil_hash_this(hi, NULL, NULL, &val);
-            neethi_policy = (neethi_policy_t *) val;
-            if (neethi_policy)
+            neethi_policy = (neethi_policy_t *)val;
+            if(neethi_policy)
                 neethi_policy_free(neethi_policy, env);
             val = NULL;
             neethi_policy = NULL;
@@ -94,7 +92,7 @@
         }
         axutil_hash_free(neethi_registry->registry, env);
     }
-    if (neethi_registry->parent)
+    if(neethi_registry->parent)
     {
         neethi_registry->parent = NULL;
     }
@@ -110,8 +108,7 @@
     axis2_char_t *key,
     neethi_policy_t *value)
 {
-    axutil_hash_set(neethi_registry->registry, key, AXIS2_HASH_KEY_STRING,
-                    value);
+    axutil_hash_set(neethi_registry->registry, key, AXIS2_HASH_KEY_STRING, value);
     return AXIS2_SUCCESS;
 }
 
@@ -123,10 +120,10 @@
 {
     neethi_policy_t *policy = NULL;
 
-    policy = (neethi_policy_t *) axutil_hash_get(neethi_registry->registry, key,
-                                                 AXIS2_HASH_KEY_STRING);
+    policy = (neethi_policy_t *)axutil_hash_get(neethi_registry->registry, key,
+        AXIS2_HASH_KEY_STRING);
 
-    if (!policy && neethi_registry->parent)
+    if(!policy && neethi_registry->parent)
     {
         return neethi_registry_lookup(neethi_registry->parent, env, key);
     }



Mime
View raw message