You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sh...@apache.org on 2008/06/25 11:43:23 UTC

svn commit: r671486 - in /webservices/axis2/trunk/c/src/core: deployment/desc_builder.c deployment/module_builder.c description/op.c description/svc.c

Author: shankar
Date: Wed Jun 25 02:43:22 2008
New Revision: 671486

URL: http://svn.apache.org/viewvc?rev=671486&view=rev
Log:
Fix for issue AXIS2C-1199, AXIS2C-1200, AXIS2C-1201

Modified:
    webservices/axis2/trunk/c/src/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/src/core/deployment/module_builder.c
    webservices/axis2/trunk/c/src/core/description/op.c
    webservices/axis2/trunk/c/src/core/description/svc.c

Modified: webservices/axis2/trunk/c/src/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/desc_builder.c?rev=671486&r1=671485&r2=671486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/desc_builder.c Wed Jun 25 02:43:22 2008
@@ -949,8 +949,9 @@
     while (module_refs &&
            axiom_children_qname_iterator_has_next(module_refs, env))
     {
-        moduleref = (axiom_element_t *)
-            axiom_children_qname_iterator_next(module_refs, env);
+        axiom_node_t *moduleref_node = axiom_children_qname_iterator_next(module_refs, env);
+        moduleref = (axiom_element_t *)axiom_node_get_data_element(moduleref_node, env);
+            
         qref = axutil_qname_create(env, AXIS2_REF, NULL, NULL);
         module_ref_attrib = axiom_element_get_attribute(moduleref, env, qref);
         axutil_qname_free(qref, env);

Modified: webservices/axis2/trunk/c/src/core/deployment/module_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/module_builder.c?rev=671486&r1=671485&r2=671486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/module_builder.c Wed Jun 25 02:43:22 2008
@@ -400,6 +400,10 @@
         axiom_node_t *recv_node = NULL;
         axis2_phases_info_t *info = NULL;
         axis2_op_t *op_desc = NULL;
+        axutil_qname_t *qpolicy = NULL;
+        axiom_children_qname_iterator_t *itr = NULL;
+        axis2_desc_t *desc = NULL;
+        axis2_policy_include_t *policy_include = NULL;
 
         op_node = (axiom_node_t *)
             axiom_children_qname_iterator_next(op_itr, env);
@@ -472,6 +476,42 @@
         axis2_desc_builder_process_rest_params(module_builder->desc_builder,
                                                    env, op_node, op_desc);
 
+        /* setting the policy_include */
+
+        desc = axis2_op_get_base(op_desc, env);
+        policy_include = axis2_desc_get_policy_include(desc, env);
+
+        /* processing <wsp:Policy> .. </..> elements */
+
+        qpolicy =
+            axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+        itr =
+            axiom_element_get_children_with_qname(op_element, env, qpolicy,
+                                                  op_node);
+        axutil_qname_free(qpolicy, env);
+        qpolicy = NULL;
+
+        if (itr)
+        {
+            axis2_process_policy_elements(env, AXIS2_MODULE_OPERATION_POLICY, itr,
+                                          policy_include);
+        }
+
+        /* processing <wsp:PolicyReference> .. </..> elements */
+        qpolicy =
+            axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+        itr =
+            axiom_element_get_children_with_qname(op_element, env, qpolicy,
+                                                  op_node);
+        axutil_qname_free(qpolicy, env);
+        qpolicy = NULL;
+
+        if (itr)
+        {
+            axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
+                                                    policy_include);
+        }
+
         /* setting the mep of the operation */
 
         /* loading the message receivers */

Modified: webservices/axis2/trunk/c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/op.c?rev=671486&r1=671485&r2=671486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/op.c (original)
+++ webservices/axis2/trunk/c/src/core/description/op.c Wed Jun 25 02:43:22 2008
@@ -68,7 +68,7 @@
     op->msg_recv = NULL;
     op->mep = AXIS2_MEP_CONSTANT_INVALID;
     op->param_container = NULL;
-    op->module_qnames = NULL;
+    op->module_qnames = axutil_array_list_create(env, 0);
     op->engaged_module_list = NULL;
     op->from_module = AXIS2_FALSE;
     op->wsamapping_list = NULL;

Modified: webservices/axis2/trunk/c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc.c?rev=671486&r1=671485&r2=671486&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc.c Wed Jun 25 02:43:22 2008
@@ -554,7 +554,15 @@
         axis2_op_set_msg_recv(op, env, msg_recv);
     }
     if (key)
-        axutil_hash_set(svc->op_alias_map, key, AXIS2_HASH_KEY_STRING, op);
+    {
+        /* If service defines the operation, then we should not override with module level 
+         * operation. Module operations are global. If any setting to be modified, those operations
+         * can be defined in service */
+        if(!axutil_hash_get(svc->op_alias_map, key, AXIS2_HASH_KEY_STRING))
+        {
+            axutil_hash_set(svc->op_alias_map, key, AXIS2_HASH_KEY_STRING, op);
+        }
+    }
     return AXIS2_SUCCESS;
 }