You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ma...@apache.org on 2007/04/20 06:26:45 UTC
svn commit: r530636 -
/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c
Author: manjula
Date: Thu Apr 19 21:26:43 2007
New Revision: 530636
URL: http://svn.apache.org/viewvc?view=rev&rev=530636
Log:
Modifying neethi engine to handle assertions.
Modified:
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c?view=diff&rev=530636&r1=530635&r2=530636
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/engine.c Thu Apr 19 21:26:43 2007
@@ -240,42 +240,61 @@
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);
- if(axutil_strcmp(local_name,NEETHI_POLICY)==0)
+ namespace = axiom_element_get_namespace(child_element, env, child_node);
+ if(!namespace)
{
- neethi_policy_t *neethi_policy = get_operator_neethi_policy(env,child_node,child_element);
- 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);
- }
+ return AXIS2_FAILURE;
+ }
+ uri = axiom_namespace_get_uri(namespace, env);
+ if(!uri)
+ return AXIS2_FAILURE;
- else if(axutil_strcmp(local_name,NEETHI_ALL)==0)
- {
- neethi_all_t *all = get_operator_all(env,child_node,child_element);
- operator = neethi_operator_create(env);
- neethi_operator_set_value(operator,env,all,OPERATOR_TYPE_ALL);
- neethi_engine_add_policy_component(env,neethi_operator,operator);
- }
+ if(axutil_strcmp(uri,NEETHI_NAMESPACE)==0)
+ {
+ if(axutil_strcmp(local_name,NEETHI_POLICY)==0)
+ {
+ neethi_policy_t *neethi_policy = get_operator_neethi_policy(env,child_node,child_element);
+ 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 if(axutil_strcmp(local_name,NEETHI_EXACTLYONE)==0)
- {
- neethi_exactlyone_t *exactlyone = get_operator_exactlyone(env,child_node,child_element);
- 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 if(axutil_strcmp(local_name,NEETHI_REFERENCE)==0)
- {
- neethi_reference_t *reference = get_operator_reference(env,child_node,child_element);
+ else if(axutil_strcmp(local_name,NEETHI_ALL)==0)
+ {
+ neethi_all_t *all = get_operator_all(env,child_node,child_element);
+ 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 if(axutil_strcmp(local_name,NEETHI_EXACTLYONE)==0)
+ {
+ neethi_exactlyone_t *exactlyone = get_operator_exactlyone(env,child_node,child_element);
+ 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 if(axutil_strcmp(local_name,NEETHI_REFERENCE)==0)
+ {
+ neethi_reference_t *reference = get_operator_reference(env,child_node,child_element);
+ operator = neethi_operator_create(env);
+ neethi_operator_set_value(operator,env,reference,OPERATOR_TYPE_REFERENCE);
+ neethi_engine_add_policy_component(env,neethi_operator,operator);
+ }
+ }
+ else
+ {
+ neethi_assertion_t *assertion = get_operator_assertion(env, child_node, child_element);
operator = neethi_operator_create(env);
- neethi_operator_set_value(operator,env,reference,OPERATOR_TYPE_REFERENCE);
+ neethi_operator_set_value(operator, env, assertion, OPERATOR_TYPE_ASSERTION);
neethi_engine_add_policy_component(env,neethi_operator,operator);
- }
- else
- return AXIS2_FAILURE;
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org