axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r580289 [7/20] - in /webservices/axis2/trunk/c: guththila/include/ guththila/samples/ guththila/src/ guththila/tests/ neethi/include/ neethi/src/ neethi/src/secpolicy/builder/ neethi/src/secpolicy/model/ neethi/test/ samples/client/echo/ sa...
Date Fri, 28 Sep 2007 10:29:43 GMT
Modified: webservices/axis2/trunk/c/neethi/src/all.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/all.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/all.c (original)
+++ webservices/axis2/trunk/c/neethi/src/all.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +16,6 @@
  * limitations under the License.
  */
 
-
-
 #include <neethi_all.h>
 
 struct neethi_all_t
@@ -24,17 +23,18 @@
     axutil_array_list_t *policy_components;
 };
 
-AXIS2_EXTERN neethi_all_t *AXIS2_CALL 
-neethi_all_create(const axutil_env_t *env)
+AXIS2_EXTERN neethi_all_t *AXIS2_CALL
+neethi_all_create(
+    const axutil_env_t * env)
 {
     neethi_all_t *neethi_all = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    neethi_all =  (neethi_all_t *) AXIS2_MALLOC (env->allocator,
-    sizeof (neethi_all_t));
+    neethi_all = (neethi_all_t *) AXIS2_MALLOC(env->allocator,
+                                               sizeof(neethi_all_t));
 
-    if(neethi_all == NULL)
+    if (neethi_all == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -42,7 +42,7 @@
     neethi_all->policy_components = NULL;
 
     neethi_all->policy_components = axutil_array_list_create(env, 0);
-    if (!(neethi_all->policy_components) )
+    if (!(neethi_all->policy_components))
     {
         neethi_all_free(neethi_all, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -51,29 +51,32 @@
     return neethi_all;
 }
 
-AXIS2_EXTERN void AXIS2_CALL 
-neethi_all_free(neethi_all_t *neethi_all,
-        const axutil_env_t *env)
+AXIS2_EXTERN void AXIS2_CALL
+neethi_all_free(
+    neethi_all_t * neethi_all,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(neethi_all)
+    if (neethi_all)
     {
-        if(neethi_all->policy_components)
+        if (neethi_all->policy_components)
         {
             int i = 0;
-            for (i = 0; i < axutil_array_list_size(neethi_all->policy_components,
-                env); i++)
+            for (i = 0;
+                 i < axutil_array_list_size(neethi_all->policy_components, env);
+                 i++)
             {
                 neethi_operator_t *operator = NULL;
-                operator = (neethi_operator_t *)
-                    axutil_array_list_get(neethi_all->policy_components, env, i);
+                operator =(neethi_operator_t *)
+                    axutil_array_list_get(neethi_all->policy_components, env,
+                                          i);
                 if (operator)
                     neethi_operator_free(operator, env);
 
                 operator = NULL;
             }
-            axutil_array_list_free(neethi_all->policy_components , env);
+            axutil_array_list_free(neethi_all->policy_components, env);
             neethi_all->policy_components = NULL;
         }
         AXIS2_FREE(env->allocator, neethi_all);
@@ -82,48 +85,47 @@
     return;
 }
 
-
 /* Implementations */
 
 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
 neethi_all_get_policy_components(
-    neethi_all_t *neethi_all,
-    const axutil_env_t *env)
+    neethi_all_t * neethi_all,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     return neethi_all->policy_components;
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 neethi_all_add_policy_components(
-        neethi_all_t *all,
-        axutil_array_list_t *arraylist,
-        const axutil_env_t *env)
+    neethi_all_t * all,
+    axutil_array_list_t * arraylist,
+    const axutil_env_t * env)
 {
 
-    int size = axutil_array_list_size(arraylist,env);
-    int i = 0;    
-
-    if (axutil_array_list_ensure_capacity(all->policy_components , env, size + 1) != AXIS2_SUCCESS)
-            return AXIS2_FAILURE;
-    
-    for(i=0; i<size; i++)
+    int size = axutil_array_list_size(arraylist, env);
+    int i = 0;
+
+    if (axutil_array_list_ensure_capacity(all->policy_components, env, size + 1)
+        != AXIS2_SUCCESS)
+        return AXIS2_FAILURE;
+
+    for (i = 0; i < size; i++)
     {
         void *value = NULL;
-        value = axutil_array_list_get(arraylist ,env ,i);
-        neethi_operator_increment_ref((neethi_operator_t *)value, env);
+        value = axutil_array_list_get(arraylist, env, i);
+        neethi_operator_increment_ref((neethi_operator_t *) value, env);
         axutil_array_list_add(all->policy_components, env, value);
     }
     return AXIS2_SUCCESS;
 }
 
-
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_all_add_operator(neethi_all_t *neethi_all,
-            const axutil_env_t *env,
-            neethi_operator_t *operator)
+neethi_all_add_operator(
+    neethi_all_t * neethi_all,
+    const axutil_env_t * env,
+    neethi_operator_t * operator)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -133,19 +135,18 @@
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-neethi_all_is_empty(neethi_all_t *all,
-            const axutil_env_t *env)
-
+neethi_all_is_empty(
+    neethi_all_t * all,
+    const axutil_env_t * env)
 {
-    return axutil_array_list_is_empty(all->policy_components , env);
+    return axutil_array_list_is_empty(all->policy_components, env);
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 neethi_all_serialize(
-    neethi_all_t *neethi_all,
-    axiom_node_t *parent,
-    const axutil_env_t *env)
+    neethi_all_t * neethi_all,
+    axiom_node_t * parent,
+    const axutil_env_t * env)
 {
 
     axiom_node_t *all_node = NULL;
@@ -154,32 +155,31 @@
     axutil_array_list_t *components = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
+    policy_ns = axiom_namespace_create(env, NEETHI_NAMESPACE, NEETHI_PREFIX);
 
-    policy_ns = axiom_namespace_create(env, NEETHI_NAMESPACE,
-                                    NEETHI_PREFIX);
-
-    all_ele = axiom_element_create(env, parent, NEETHI_ALL, policy_ns, &all_node);
+    all_ele =
+        axiom_element_create(env, parent, NEETHI_ALL, policy_ns, &all_node);
     if (!all_node)
     {
-        /*printf("Exactlyone serialization failed\n");*/
+        /*printf("Exactlyone serialization failed\n"); */
         return AXIS2_FAILURE;
     }
     components = neethi_all_get_policy_components(neethi_all, env);
 
-    if(components)
+    if (components)
     {
-        int i=0;
-        for (i = 0; i < axutil_array_list_size(components ,
-                env); i++)
+        int i = 0;
+        for (i = 0; i < axutil_array_list_size(components, env); i++)
         {
             neethi_operator_t *operator = NULL;
-            operator = (neethi_operator_t *)axutil_array_list_get(components, env, i);
-            if(operator)
+            operator =(neethi_operator_t *) axutil_array_list_get(components,
+                                                                  env, i);
+            if (operator)
             {
                 status = neethi_operator_serialize(operator, env, all_node);
-                if(status != AXIS2_SUCCESS)
+                if (status != AXIS2_SUCCESS)
                 {
-                    /*printf("Operator Serializing failed\n");*/
+                    /*printf("Operator Serializing failed\n"); */
                     return status;
                 }
             }
@@ -187,4 +187,3 @@
     }
     return status;
 }
-

Modified: webservices/axis2/trunk/c/neethi/src/assertion.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/assertion.c?rev=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/assertion.c (original)
+++ webservices/axis2/trunk/c/neethi/src/assertion.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,8 +16,6 @@
  * limitations under the License.
  */
 
-
-
 #include <neethi_assertion.h>
 #include <rp_x509_token.h>
 #include <rp_property.h>
@@ -40,17 +39,19 @@
     AXIS2_FREE_VOID_ARG free_func;
 };
 
-AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL 
-neethi_assertion_create(const axutil_env_t *env)
+AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
+neethi_assertion_create(
+    const axutil_env_t * env)
 {
     neethi_assertion_t *neethi_assertion = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    neethi_assertion =  (neethi_assertion_t *) AXIS2_MALLOC (env->allocator,
-    sizeof (neethi_assertion_t));
+    neethi_assertion = (neethi_assertion_t *) AXIS2_MALLOC(env->allocator,
+                                                           sizeof
+                                                           (neethi_assertion_t));
 
-    if(neethi_assertion == NULL)
+    if (neethi_assertion == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -60,6 +61,7 @@
     neethi_assertion->policy_components = axutil_array_list_create(env, 0);
     if (!(neethi_assertion->policy_components))
     {
+
 /*      policy_free(policy, env);*/
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -74,9 +76,9 @@
     return neethi_assertion;
 }
 
-
 neethi_assertion_t *AXIS2_CALL
-neethi_assertion_create_with_args(const axutil_env_t *env,
+neethi_assertion_create_with_args(
+    const axutil_env_t * env,
     AXIS2_FREE_VOID_ARG free_func,
     void *value,
     neethi_assertion_type_t type)
@@ -85,10 +87,11 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    neethi_assertion =  (neethi_assertion_t *) AXIS2_MALLOC (env->allocator,
-    sizeof (neethi_assertion_t));
+    neethi_assertion = (neethi_assertion_t *) AXIS2_MALLOC(env->allocator,
+                                                           sizeof
+                                                           (neethi_assertion_t));
 
-    if(neethi_assertion == NULL)
+    if (neethi_assertion == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -98,55 +101,59 @@
     neethi_assertion->policy_components = axutil_array_list_create(env, 0);
     if (!(neethi_assertion->policy_components))
     {
+
 /*      policy_free(policy, env);*/
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    if(type == ASSERTION_TYPE_X509_TOKEN)
+    if (type == ASSERTION_TYPE_X509_TOKEN)
     {
-        rp_x509_token_increment_ref((rp_x509_token_t *)value, env);
+        rp_x509_token_increment_ref((rp_x509_token_t *) value, env);
     }
-    if(type == ASSERTION_TYPE_INITIATOR_TOKEN)
+    if (type == ASSERTION_TYPE_INITIATOR_TOKEN)
     {
-        rp_property_increment_ref((rp_property_t *)value, env);
-    }    
-    if(type == ASSERTION_TYPE_RECIPIENT_TOKEN)
+        rp_property_increment_ref((rp_property_t *) value, env);
+    }
+    if (type == ASSERTION_TYPE_RECIPIENT_TOKEN)
     {
-        rp_property_increment_ref((rp_property_t *)value, env);
+        rp_property_increment_ref((rp_property_t *) value, env);
     }
-    if(type == ASSERTION_TYPE_LAYOUT)
+    if (type == ASSERTION_TYPE_LAYOUT)
     {
-        rp_layout_increment_ref((rp_layout_t *)value, env);
+        rp_layout_increment_ref((rp_layout_t *) value, env);
     }
-    if(type == ASSERTION_TYPE_ALGORITHM_SUITE)
+    if (type == ASSERTION_TYPE_ALGORITHM_SUITE)
     {
-        rp_algorithmsuite_increment_ref((rp_algorithmsuite_t *)value, env);
+        rp_algorithmsuite_increment_ref((rp_algorithmsuite_t *) value, env);
     }
-    if(type == ASSERTION_TYPE_WSS10)
+    if (type == ASSERTION_TYPE_WSS10)
     {
-        rp_wss10_increment_ref((rp_wss10_t *)value, env);
+        rp_wss10_increment_ref((rp_wss10_t *) value, env);
     }
-    if(type == ASSERTION_TYPE_SUPPORTING_TOKENS)
+    if (type == ASSERTION_TYPE_SUPPORTING_TOKENS)
     {
-        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env);
+        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *) value,
+                                           env);
     }
-    if(type == ASSERTION_TYPE_USERNAME_TOKEN)
+    if (type == ASSERTION_TYPE_USERNAME_TOKEN)
     {
-        rp_username_token_increment_ref((rp_username_token_t *)value, env);
+        rp_username_token_increment_ref((rp_username_token_t *) value, env);
     }
 
-    if(type == ASSERTION_TYPE_ASSYMMETRIC_BINDING)
+    if (type == ASSERTION_TYPE_ASSYMMETRIC_BINDING)
     {
-        rp_asymmetric_binding_increment_ref((rp_asymmetric_binding_t *)value, env);
-    }    
-    if(type == ASSERTION_TYPE_SIGNED_ENCRYPTED_PARTS)
+        rp_asymmetric_binding_increment_ref((rp_asymmetric_binding_t *) value,
+                                            env);
+    }
+    if (type == ASSERTION_TYPE_SIGNED_ENCRYPTED_PARTS)
     {
-        rp_signed_encrypted_parts_increment_ref((rp_signed_encrypted_parts_t *)value, env);
+        rp_signed_encrypted_parts_increment_ref((rp_signed_encrypted_parts_t *)
+                                                value, env);
     }
-    if(type == ASSERTION_TYPE_RAMPART_CONFIG)
+    if (type == ASSERTION_TYPE_RAMPART_CONFIG)
     {
-        rp_rampart_config_increment_ref((rp_rampart_config_t *)value, env);
+        rp_rampart_config_increment_ref((rp_rampart_config_t *) value, env);
     }
     neethi_assertion->value = value;
     neethi_assertion->type = type;
@@ -159,26 +166,26 @@
 
 }
 
-
-
-
-AXIS2_EXTERN void AXIS2_CALL 
-neethi_assertion_free(neethi_assertion_t *neethi_assertion,
-        const axutil_env_t *env)
+AXIS2_EXTERN void AXIS2_CALL
+neethi_assertion_free(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if(neethi_assertion)
+    if (neethi_assertion)
     {
-        if(neethi_assertion->policy_components)
+        if (neethi_assertion->policy_components)
         {
             int i = 0;
-            for (i = 0; i < axutil_array_list_size(neethi_assertion->policy_components,
-                env); i++)
+            for (i = 0;
+                 i < axutil_array_list_size(neethi_assertion->policy_components,
+                                            env); i++)
             {
                 neethi_operator_t *operator = NULL;
-                operator = (neethi_operator_t *)
-                    axutil_array_list_get(neethi_assertion->policy_components, env, i);
+                operator =(neethi_operator_t *)
+                    axutil_array_list_get(neethi_assertion->policy_components,
+                                          env, i);
                 if (operator)
                     neethi_operator_free(operator, env);
 
@@ -187,9 +194,9 @@
             axutil_array_list_free(neethi_assertion->policy_components, env);
             neethi_assertion->policy_components = NULL;
         }
-        if(neethi_assertion->value)
+        if (neethi_assertion->value)
         {
-            if(neethi_assertion->free_func)
+            if (neethi_assertion->free_func)
             {
                 neethi_assertion->free_func(neethi_assertion->value, env);
             }
@@ -202,19 +209,20 @@
 
 /* Implementations */
 
-AXIS2_EXTERN neethi_assertion_type_t AXIS2_CALL 
-neethi_assertion_get_type(neethi_assertion_t *neethi_assertion,
-            const axutil_env_t *env)
+AXIS2_EXTERN neethi_assertion_type_t AXIS2_CALL
+neethi_assertion_get_type(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-        
+
     return neethi_assertion->type;
 }
 
 AXIS2_EXTERN void *AXIS2_CALL
 neethi_assertion_get_value(
-    neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -222,27 +230,28 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_assertion_set_value(neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env,
+neethi_assertion_set_value(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env,
     void *value,
     neethi_assertion_type_t type)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     neethi_assertion->type = type;
-    if(type == ASSERTION_TYPE_X509_TOKEN)
+    if (type == ASSERTION_TYPE_X509_TOKEN)
     {
-        rp_x509_token_increment_ref((rp_x509_token_t *)value, env);
-    }    
-    neethi_assertion->value =(void *)value;
+        rp_x509_token_increment_ref((rp_x509_token_t *) value, env);
+    }
+    neethi_assertion->value = (void *) value;
 
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axiom_element_t *AXIS2_CALL
 neethi_assertion_get_element(
-    neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -250,9 +259,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_assertion_set_element(neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env,
-    axiom_element_t *element)
+neethi_assertion_set_element(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env,
+    axiom_element_t * element)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -262,8 +272,8 @@
 
 AXIS2_EXTERN axiom_node_t *AXIS2_CALL
 neethi_assertion_get_node(
-    neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -271,9 +281,10 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_assertion_set_node(neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env,
-    axiom_node_t *node)
+neethi_assertion_set_node(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env,
+    axiom_node_t * node)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -281,11 +292,10 @@
     return AXIS2_SUCCESS;
 }
 
-
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 neethi_assertion_get_is_optional(
-    neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -293,8 +303,9 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_assertion_set_is_optional(neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env,
+neethi_assertion_set_is_optional(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env,
     axis2_bool_t is_optional)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -305,8 +316,8 @@
 
 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
 neethi_assertion_get_policy_components(
-    neethi_assertion_t *neethi_assertion,
-    const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
@@ -315,31 +326,33 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 neethi_assertion_add_policy_components(
-        neethi_assertion_t *neethi_assertion,
-        axutil_array_list_t *arraylist,
-        const axutil_env_t *env)
+    neethi_assertion_t * neethi_assertion,
+    axutil_array_list_t * arraylist,
+    const axutil_env_t * env)
 {
 
-    int size = axutil_array_list_size(arraylist,env);
+    int size = axutil_array_list_size(arraylist, env);
     int i = 0;
 
-    if (axutil_array_list_ensure_capacity(neethi_assertion->policy_components , env, size
+ 1) != AXIS2_SUCCESS)
-            return AXIS2_FAILURE;
+    if (axutil_array_list_ensure_capacity
+        (neethi_assertion->policy_components, env, size + 1) != AXIS2_SUCCESS)
+        return AXIS2_FAILURE;
 
-    for(i=0; i<size; i++)
+    for (i = 0; i < size; i++)
     {
         void *value = NULL;
-        value = axutil_array_list_get(arraylist ,env ,i);
-        neethi_operator_increment_ref((neethi_operator_t *)value, env);
+        value = axutil_array_list_get(arraylist, env, i);
+        neethi_operator_increment_ref((neethi_operator_t *) value, env);
         axutil_array_list_add(neethi_assertion->policy_components, env, value);
     }
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-neethi_assertion_add_operator(neethi_assertion_t *neethi_assertion,
-            const axutil_env_t *env,
-            neethi_operator_t *operator)
+neethi_assertion_add_operator(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env,
+    neethi_operator_t * operator)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
@@ -349,33 +362,33 @@
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-neethi_assertion_is_empty(neethi_assertion_t *neethi_assertion,
-            const axutil_env_t *env)
-
+neethi_assertion_is_empty(
+    neethi_assertion_t * neethi_assertion,
+    const axutil_env_t * env)
 {
-    return axutil_array_list_is_empty(neethi_assertion->policy_components , env);
+    return axutil_array_list_is_empty(neethi_assertion->policy_components, env);
 }
 
-
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 neethi_assertion_serialize(
-    neethi_assertion_t *assertion,
-    axiom_node_t *parent,
-    const axutil_env_t *env)
+    neethi_assertion_t * assertion,
+    axiom_node_t * parent,
+    const axutil_env_t * env)
 {
     axiom_namespace_t *namespace = NULL;
     axiom_element_t *element = NULL;
     axiom_node_t *node = NULL;
     axis2_char_t *localname = NULL;
 
-    namespace = axiom_element_get_namespace(assertion->element, env, assertion->node);
+    namespace =
+        axiom_element_get_namespace(assertion->element, env, assertion->node);
     localname = axiom_element_get_localname(assertion->element, env);
-           
+
     element = axiom_element_create(env, parent, localname, namespace, &node);
 
     if (!node)
     {
-        /*printf("Assertion serialization failed\n");*/
+        /*printf("Assertion serialization failed\n"); */
         return AXIS2_FAILURE;
     }
     return AXIS2_SUCCESS;

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=580289&r1=580288&r2=580289&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/assertion_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/assertion_builder.c Fri Sep 28 03:29:16 2007
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -15,361 +16,431 @@
  * limitations under the License.
  */
 
-
-
 #include <neethi_assertion_builder.h>
 
-
-AXIS2_EXTERN neethi_assertion_t * AXIS2_CALL
+AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
 neethi_assertion_builder_build(
-    const axutil_env_t *env,
-    axiom_node_t *node,
-    axiom_element_t *element)
+    const axutil_env_t * env,
+    axiom_node_t * node,
+    axiom_element_t * element)
 {
-    
+
     axis2_char_t *localname = NULL;
 
-    localname = axiom_element_get_localname(element,env);
-    if(!localname)
+    localname = axiom_element_get_localname(element, env);
+    if (!localname)
     {
         return NULL;
-    }        
-    
-    if(axutil_strcmp(localname, RP_TRANSPORT_BINDING) ==0 )
+    }
+
+    if (axutil_strcmp(localname, RP_TRANSPORT_BINDING) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_TRANSPORT_BINDING, node, element))
+        if (rp_match_secpolicy_qname(env, RP_TRANSPORT_BINDING, node, element))
         {
             return rp_transport_binding_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-   
-    if(axutil_strcmp(localname, RP_ASYMMETRIC_BINDING) ==0 )
+
+    if (axutil_strcmp(localname, RP_ASYMMETRIC_BINDING) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ASYMMETRIC_BINDING, node, element))
+        if (rp_match_secpolicy_qname(env, RP_ASYMMETRIC_BINDING, node, element))
         {
             return rp_asymmetric_binding_builder_build(env, node, element);
         }
-        else return NULL;
-    }        
+        else
+            return NULL;
+    }
 
-    else if(axutil_strcmp(localname, RP_TRANSPORT_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_TRANSPORT_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_TRANSPORT_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_TRANSPORT_TOKEN, node, element))
         {
             return rp_transport_token_builder_build(env, node, element);
-        }            
-        else return NULL;
+        }
+        else
+            return NULL;
     }
-    
-    else if(axutil_strcmp(localname,RP_RECIPIENT_TOKEN )==0)
+
+    else if (axutil_strcmp(localname, RP_RECIPIENT_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_RECIPIENT_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_RECIPIENT_TOKEN, node, element))
         {
             return rp_recipient_token_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_INITIATOR_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_INITIATOR_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_INITIATOR_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_INITIATOR_TOKEN, node, element))
         {
             return rp_initiator_token_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_X509_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_X509_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_X509_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_X509_TOKEN, node, element))
         {
             return rp_x509_token_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_ENCRYPT_BEFORE_SIGNING)==0)
+    else if (axutil_strcmp(localname, RP_ENCRYPT_BEFORE_SIGNING) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ENCRYPT_BEFORE_SIGNING, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_ENCRYPT_BEFORE_SIGNING, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_ENCRYPT_BEFORE_SIGNING);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_ENCRYPT_BEFORE_SIGNING);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_SIGN_BEFORE_ENCRYPTING)==0)
+    else if (axutil_strcmp(localname, RP_SIGN_BEFORE_ENCRYPTING) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_SIGN_BEFORE_ENCRYPTING, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_SIGN_BEFORE_ENCRYPTING, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL,ASSERTION_TYPE_SIGN_BEFORE_ENCRYPTING);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_SIGN_BEFORE_ENCRYPTING);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_ENCRYPT_SIGNATURE)==0)
+    else if (axutil_strcmp(localname, RP_ENCRYPT_SIGNATURE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ENCRYPT_SIGNATURE, node, element))
+        if (rp_match_secpolicy_qname(env, RP_ENCRYPT_SIGNATURE, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_ENCRYPT_SIGNATURE);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_ENCRYPT_SIGNATURE);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_PROTECT_TOKENS)==0)
+    else if (axutil_strcmp(localname, RP_PROTECT_TOKENS) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_PROTECT_TOKENS, node, element))
+        if (rp_match_secpolicy_qname(env, RP_PROTECT_TOKENS, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_PROTECT_TOKENS);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_PROTECT_TOKENS);
             return assertion;
         }
-        else return NULL;
-    }    
-    else if(axutil_strcmp(localname, RP_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY)==0)
+        else
+            return NULL;
+    }
+    else if (axutil_strcmp(localname, RP_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY) ==
+             0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY);
             return assertion;
         }
-        else return NULL;
-    } 
-    else if(axutil_strcmp(localname, RP_REQUIRE_KEY_IDENTIFIRE_REFERENCE)==0)
+        else
+            return NULL;
+    }
+    else if (axutil_strcmp(localname, RP_REQUIRE_KEY_IDENTIFIRE_REFERENCE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_REQUIRE_KEY_IDENTIFIRE_REFERENCE, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_REQUIRE_KEY_IDENTIFIRE_REFERENCE, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_REQUIRE_KEY_IDENTIFIRE_REFERENCE);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_REQUIRE_KEY_IDENTIFIRE_REFERENCE);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_REQUIRE_ISSUER_SERIAL_REFERENCE)==0)
+    else if (axutil_strcmp(localname, RP_REQUIRE_ISSUER_SERIAL_REFERENCE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_REQUIRE_ISSUER_SERIAL_REFERENCE, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_REQUIRE_ISSUER_SERIAL_REFERENCE, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_REQUIRE_ISSUER_SERIAL_REFERENCE);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_REQUIRE_ISSUER_SERIAL_REFERENCE);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_REQUIRE_EMBEDDED_TOKEN_REFERENCE)==0)
+    else if (axutil_strcmp(localname, RP_REQUIRE_EMBEDDED_TOKEN_REFERENCE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_REQUIRE_EMBEDDED_TOKEN_REFERENCE, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_REQUIRE_EMBEDDED_TOKEN_REFERENCE, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_REQUIRE_EMBEDDED_TOKEN_REFERENCE);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_REQUIRE_EMBEDDED_TOKEN_REFERENCE);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_REQUIRE_THUMBPRINT_REFERENCE)==0)
+    else if (axutil_strcmp(localname, RP_REQUIRE_THUMBPRINT_REFERENCE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_REQUIRE_THUMBPRINT_REFERENCE, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_REQUIRE_THUMBPRINT_REFERENCE, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_REQUIRE_THUMBPRINT_REFERENCE);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_REQUIRE_THUMBPRINT_REFERENCE);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_WSS_X509_V1_TOKEN_10)==0)
+    else if (axutil_strcmp(localname, RP_WSS_X509_V1_TOKEN_10) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_WSS_X509_V1_TOKEN_10, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_WSS_X509_V1_TOKEN_10, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_WSS_X509_V1_TOKEN_10);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_WSS_X509_V1_TOKEN_10);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_WSS_X509_V3_TOKEN_10)==0)
+    else if (axutil_strcmp(localname, RP_WSS_X509_V3_TOKEN_10) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_WSS_X509_V3_TOKEN_10, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_WSS_X509_V3_TOKEN_10, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_WSS_X509_V3_TOKEN_10);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_WSS_X509_V3_TOKEN_10);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_ALGORITHM_SUITE)==0)
+    else if (axutil_strcmp(localname, RP_ALGORITHM_SUITE) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ALGORITHM_SUITE, node, element))
+        if (rp_match_secpolicy_qname(env, RP_ALGORITHM_SUITE, node, element))
         {
             return rp_algorithmsuite_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_LAYOUT)==0)
+    else if (axutil_strcmp(localname, RP_LAYOUT) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_LAYOUT, node, element))
+        if (rp_match_secpolicy_qname(env, RP_LAYOUT, node, element))
         {
             return rp_layout_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_USERNAME_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_USERNAME_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_USERNAME_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_USERNAME_TOKEN, node, element))
         {
             return rp_username_token_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_SIGNED_SUPPORTING_TOKENS)==0)
+    else if (axutil_strcmp(localname, RP_SIGNED_SUPPORTING_TOKENS) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_SIGNED_SUPPORTING_TOKENS, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_SIGNED_SUPPORTING_TOKENS, node, element))
         {
             return rp_supporting_tokens_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_SIGNED_ENDORSING_SUPPORTING_TOKENS)==0)
+    else if (axutil_strcmp(localname, RP_SIGNED_ENDORSING_SUPPORTING_TOKENS) ==
+             0)
     {
-        if(rp_match_secpolicy_qname(env, RP_SIGNED_ENDORSING_SUPPORTING_TOKENS, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_SIGNED_ENDORSING_SUPPORTING_TOKENS, node, element))
         {
             return rp_supporting_tokens_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_WSS10)==0)
+    else if (axutil_strcmp(localname, RP_WSS10) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_WSS10, node, element))
+        if (rp_match_secpolicy_qname(env, RP_WSS10, node, element))
         {
             return rp_wss10_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_INCLUDE_TIMESTAMP)==0)
+    else if (axutil_strcmp(localname, RP_INCLUDE_TIMESTAMP) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_INCLUDE_TIMESTAMP, node, element))
+        if (rp_match_secpolicy_qname(env, RP_INCLUDE_TIMESTAMP, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_INCLUDE_TIMESTAMP);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_INCLUDE_TIMESTAMP);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_HTTPS_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_HTTPS_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_HTTPS_TOKEN, node, element))
+        if (rp_match_secpolicy_qname(env, RP_HTTPS_TOKEN, node, element))
         {
             return rp_https_token_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_WSS_USERNAME_TOKEN_10)==0)
+    else if (axutil_strcmp(localname, RP_WSS_USERNAME_TOKEN_10) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_WSS_USERNAME_TOKEN_10, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_WSS_USERNAME_TOKEN_10, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_WSS_USERNAME_TOKEN_10);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_WSS_USERNAME_TOKEN_10);
             return assertion;
         }
-        else return NULL;
-    }        
-    else if(axutil_strcmp(localname, RP_WSS_USERNAME_TOKEN_11)==0)
+        else
+            return NULL;
+    }
+    else if (axutil_strcmp(localname, RP_WSS_USERNAME_TOKEN_11) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_WSS_USERNAME_TOKEN_11, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_WSS_USERNAME_TOKEN_11, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_WSS_USERNAME_TOKEN_11);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_WSS_USERNAME_TOKEN_11);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_MUST_SUPPORT_REF_KEY_IDENTIFIER)==0)
+    else if (axutil_strcmp(localname, RP_MUST_SUPPORT_REF_KEY_IDENTIFIER) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_MUST_SUPPORT_REF_KEY_IDENTIFIER, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_MUST_SUPPORT_REF_KEY_IDENTIFIER, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_MUST_SUPPORT_REF_ISSUER_SERIAL)==0)
+    else if (axutil_strcmp(localname, RP_MUST_SUPPORT_REF_ISSUER_SERIAL) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_MUST_SUPPORT_REF_ISSUER_SERIAL, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_MUST_SUPPORT_REF_ISSUER_SERIAL, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_MUST_SUPPORT_REF_EXTERNAL_URI)==0)
+    else if (axutil_strcmp(localname, RP_MUST_SUPPORT_REF_EXTERNAL_URI) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_MUST_SUPPORT_REF_EXTERNAL_URI, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_MUST_SUPPORT_REF_EXTERNAL_URI, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_MUST_SUPPORT_REF_EMBEDDED_TOKEN)==0)
+    else if (axutil_strcmp(localname, RP_MUST_SUPPORT_REF_EMBEDDED_TOKEN) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_MUST_SUPPORT_REF_EMBEDDED_TOKEN, node, element))
+        if (rp_match_secpolicy_qname
+            (env, RP_MUST_SUPPORT_REF_EMBEDDED_TOKEN, node, element))
         {
             neethi_assertion_t *assertion = NULL;
             assertion = neethi_assertion_create(env);
-            neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN);
+            neethi_assertion_set_value(assertion, env, NULL,
+                                       ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN);
             return assertion;
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_SIGNED_PARTS)==0)
+    else if (axutil_strcmp(localname, RP_SIGNED_PARTS) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_SIGNED_PARTS, node, element))
+        if (rp_match_secpolicy_qname(env, RP_SIGNED_PARTS, node, element))
         {
             return rp_signed_encrypted_parts_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else if(axutil_strcmp(localname, RP_ENCRYPTED_PARTS)==0)
+    else if (axutil_strcmp(localname, RP_ENCRYPTED_PARTS) == 0)
     {
-        if(rp_match_secpolicy_qname(env, RP_ENCRYPTED_PARTS, node, element))
+        if (rp_match_secpolicy_qname(env, RP_ENCRYPTED_PARTS, node, element))
         {
             return rp_signed_encrypted_parts_builder_build(env, node, element);
         }
-        else return NULL;
-    }       
-    else if(axutil_strcmp(localname, RP_RAMPART_CONFIG)==0)
+        else
+            return NULL;
+    }
+    else if (axutil_strcmp(localname, RP_RAMPART_CONFIG) == 0)
     {
-        if(rp_match_rampart_config_qname(env, RP_RAMPART_CONFIG, node, element))
+        if (rp_match_rampart_config_qname
+            (env, RP_RAMPART_CONFIG, node, element))
         {
             return rp_rampart_config_builder_build(env, node, element);
         }
-        else return NULL;
+        else
+            return NULL;
     }
-    else 
+    else
     {
         neethi_assertion_t *assertion = NULL;
         assertion = neethi_assertion_create(env);
-        neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_UNKNOWN);
-        neethi_assertion_set_element(assertion, env, element);        
+        neethi_assertion_set_value(assertion, env, NULL,
+                                   ASSERTION_TYPE_UNKNOWN);
+        neethi_assertion_set_element(assertion, env, element);
         neethi_assertion_set_node(assertion, env, node);
         return assertion;
     }



---------------------------------------------------------------------
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