axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r531315 - in /webservices/axis2/scratch/c/neethi/axis2c: include/ src/core/description/ src/core/engine/
Date Mon, 23 Apr 2007 02:04:30 GMT
Author: samisa
Date: Sun Apr 22 19:04:29 2007
New Revision: 531315

URL: http://svn.apache.org/viewvc?view=rev&rev=531315
Log:
Added policy include struct and also added that to description hierarchy

Added:
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_policy_include.h
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/policy_include.c
Modified:
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_conf.h
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_desc.h
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_msg.h
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_op.h
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc.h
    webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc_grp.h
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/Makefile.am
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/desc.c
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/msg.c
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/op.c
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc.c
    webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc_grp.c
    webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/Makefile.am
    webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_conf.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_conf.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_conf.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_conf.h Sun Apr 22 19:04:29 2007
@@ -671,6 +671,15 @@
     axis2_conf_get_param_container(const axis2_conf_t *conf,
         const axutil_env_t *env);
 
+    /** 
+     * Gets base description.
+     * @param conf pointer to message
+     * @param env pointer to environment struct
+     * @return pointer to base description struct
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_conf_get_base(const axis2_conf_t *conf,
+        const axutil_env_t *env);
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_desc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_desc.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_desc.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_desc.h Sun Apr 22 19:04:29 2007
@@ -37,6 +37,8 @@
 
     /** Type name of struct axis2_desc */
     typedef struct axis2_desc axis2_desc_t;
+    
+    struct axis2_policy_include;
 
 	/**
      * Creates a description struct instance.    
@@ -154,6 +156,37 @@
         const axutil_env_t *env,
         const axis2_char_t *key);
     
+    /**
+     * Sets parent description.
+     * @param desc pointer to description
+     * @param env pointer to environment struct
+     * @param parent pointer to parent description 
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_desc_set_parent(axis2_desc_t *desc,
+        const axutil_env_t *env,
+        axis2_desc_t *parent);
+
+    /**
+     * Gets parent description.
+     * @param desc pointer to description
+     * @param env pointer to environment struct
+     * @return parent pointer to parent description 
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_desc_get_parent(const axis2_desc_t *desc,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_desc_set_policy_include(axis2_desc_t *desc,
+        const axutil_env_t *env,
+        struct axis2_policy_include *policy_include);
+
+    AXIS2_EXTERN struct axis2_policy_include *AXIS2_CALL
+    axis2_desc_get_policy_include(const axis2_desc_t *desc,
+        const axutil_env_t *env);
+
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_msg.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_msg.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_msg.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_msg.h Sun Apr 22 19:04:29 2007
@@ -230,6 +230,16 @@
         const axutil_env_t *env,
         const axis2_char_t *name);
 
+    /** 
+     * Gets base description.
+     * @param msg pointer to message
+     * @param env pointer to environment struct
+     * @return pointer to base description struct
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_msg_get_base(const axis2_msg_t *msg,
+        const axutil_env_t *env);
+
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_op.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_op.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_op.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_op.h Sun Apr 22 19:04:29 2007
@@ -596,6 +596,15 @@
     axis2_op_free_void_arg(void *op,
         const axutil_env_t *env);
 
+    /** 
+     * Gets base description.
+     * @param op pointer to message
+     * @param env pointer to environment struct
+     * @return pointer to base description struct
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_op_get_base(const axis2_op_t *op,
+        const axutil_env_t *env);
 /** @} */
 #ifdef __cplusplus
 }

Added: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_policy_include.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_policy_include.h?view=auto&rev=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_policy_include.h (added)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_policy_include.h Sun Apr 22 19:04:29
2007
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_POLICY_INCLUDE_H
+#define AXIS2_POLICY_INCLUDE_H
+
+/** 
+ * @defgroup axis2_policy_include policy include
+ * @ingroup axis2_desc
+ * @{
+ */
+
+#include <axutil_array_list.h>
+#include <axis2_desc.h>
+#include <neethi_policy.h>
+#include <neethi_registry.h>
+#include <neethi_reference.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /** Type name for struct axis2_policy_include */
+    typedef struct axis2_policy_include axis2_policy_include_t;
+
+    typedef enum axis2_policy_types
+    {
+        AXIS2_POLICY = 0,
+        AXIS2_MODULE_POLICY,
+        AXIS2_SERVICE_POLICY,
+        AXIS2_OPERATION_POLICY,
+        AXIS2_MESSAGE_POLICY,
+        AXIS2_PORT_POLICY,
+        AXIS2_PORT_TYPE_POLICY,
+        AXIS2_BINDING_POLICY,
+        AXIS2_BINDING_OPERATION_POLICY,
+        AXIS2_INPUT_POLICY,
+        AXIS2_OUTPUT_POLICY,
+        AXIS2_BINDING_INPUT_POLICY,
+        AXIS2_BINDING_OUTPUT_POLICY,
+        AXIS2_MODULE_OPERATION_POLICY,
+        AXIS2_ANON_POLICY
+    } axis2_policy_types;
+
+   
+    /**
+     * Creates policy include struct.
+     * @param env pointer to environment struct
+     * @return pointer to newly created policy include
+     */
+    AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+    axis2_policy_include_create(const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+    axis2_policy_include_create_with_desc(const axutil_env_t *env,
+        axis2_desc_t *desc);
+
+    /**
+     * Frees policy include.
+     * @param policy_include pointer to policy include
+     * @param env pointer to environment struct
+     * @return void
+     */
+    AXIS2_EXTERN void AXIS2_CALL
+    axis2_policy_include_free(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+
+    AXIS2_EXTERN void AXIS2_CALL
+    axis2_policy_include_free(
+        axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_set_registry(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env, 
+        neethi_registry_t *registry);
+
+    AXIS2_EXTERN neethi_registry_t *AXIS2_CALL
+    axis2_policy_include_get_registry(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_set_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env, 
+        neethi_policy_t *policy);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_update_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env, 
+        neethi_policy_t *policy);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_set_effective_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env, 
+        neethi_policy_t *effective_policy);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_set_desc(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env, 
+        axis2_desc_t *desc);
+
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_policy_include_get_desc(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+    axis2_policy_include_get_parent(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+    axis2_policy_include_get_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+    axis2_policy_include_get_effective_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+    axis2_policy_include_get_policy_elements(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+    axis2_policy_include_get_policy_elements_with_type(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        int type);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_register_policy(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        axis2_char_t *key,
+        neethi_policy_t *effective_policy);
+
+    AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+    axis2_policy_include_get_policy_with_key(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        axis2_char_t *key);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_add_policy_element(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        int type,
+        neethi_policy_t *policy);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_add_policy_reference_element(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        int type,
+        neethi_reference_t *reference);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_remove_policy_element(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env,
+        axis2_char_t *policy_uri);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_policy_include_remove_all_policy_element(axis2_policy_include_t *policy_include,
+        const axutil_env_t *env);
+
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif  /* AXIS2_POLICY_INCLUDE_H */

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc.h Sun Apr 22 19:04:29 2007
@@ -1021,6 +1021,15 @@
         const axutil_env_t *env,
         void *impl_class);
 
+    /** 
+     * Gets base description.
+     * @param svc pointer to message
+     * @param env pointer to environment struct
+     * @return pointer to base description struct
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_svc_get_base(const axis2_svc_t *svc,
+        const axutil_env_t *env);
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc_grp.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc_grp.h?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc_grp.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/include/axis2_svc_grp.h Sun Apr 22 19:04:29
2007
@@ -45,6 +45,7 @@
  */
 
 #include <axutil_param_container.h>
+#include <axis2_desc.h>
 #include <axis2_svc.h>
 #include <axis2_svc_grp_ctx.h>
 
@@ -309,6 +310,16 @@
     AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
     axis2_svc_grp_create_with_conf(const axutil_env_t *env,
         struct axis2_conf *conf);
+
+    /** 
+     * Gets base description.
+     * @param svc_grp pointer to message
+     * @param env pointer to environment struct
+     * @return pointer to base description struct
+     */
+    AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+    axis2_svc_grp_get_base(const axis2_svc_grp_t *svc_grp,
+        const axutil_env_t *env);
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/Makefile.am?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/Makefile.am Sun Apr 22
19:04:29 2007
@@ -2,6 +2,7 @@
 
 libaxis2_description_la_SOURCES =desc.c \
                                 op.c \
+                                policy_include.c \
                                 svc.c \
                                 module_desc.c \
                                 svc_grp.c \
@@ -16,5 +17,6 @@
 INCLUDES = -I$(top_builddir)/include \
             -I$(top_builddir)/src/core/engine \
             -I$(top_builddir)/util/include \
-            -I$(top_builddir)/axiom/include
+            -I$(top_builddir)/axiom/include \
+            -I$(top_builddir)/neethi/include
 

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/desc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/desc.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/desc.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/desc.c Sun Apr 22 19:04:29
2007
@@ -18,6 +18,7 @@
 #include <axis2_desc.h>
 #include <axutil_property.h>
 #include <axis2_msg.h>
+#include <axis2_policy_include.h>
 
 struct axis2_desc
 {
@@ -26,6 +27,10 @@
 
     /** children of this description */
     axutil_hash_t *children;
+
+    axis2_desc_t *parent;
+
+    axis2_policy_include_t *policy_include;
 };
 
 AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
@@ -46,6 +51,8 @@
 
     desc->param_container = NULL;
     desc->children = NULL;
+    desc->parent = NULL;
+    desc->policy_include = NULL;
 
     desc->param_container = (axutil_param_container_t *)
         axutil_param_container_create(env);
@@ -195,4 +202,43 @@
     }
     return AXIS2_FAILURE;
 }
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_desc_get_parent(const axis2_desc_t *desc,
+    const axutil_env_t *env)
+{
+    return desc->parent;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_desc_set_parent(axis2_desc_t *desc,
+    const axutil_env_t *env,
+    axis2_desc_t *parent)
+{
+    desc->parent = parent;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_desc_set_policy_include(axis2_desc_t *desc,
+    const axutil_env_t *env,
+    axis2_policy_include_t *policy_include)
+{
+    if (desc->policy_include)
+    {
+        axis2_policy_include_free(desc->policy_include, env);
+        desc->policy_include = NULL;
+    }
+    
+    desc->policy_include = policy_include;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+axis2_desc_get_policy_include(const axis2_desc_t *desc,
+    const axutil_env_t *env)
+{
+    return desc->policy_include;
+}
+
 

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/msg.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/msg.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/msg.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/msg.c Sun Apr 22 19:04:29
2007
@@ -32,6 +32,8 @@
     axis2_char_t *direction;
     /** parameter container to hold message parameters */
     struct axutil_param_container *param_container;
+    /** base description struct */
+    axis2_desc_t *base;
 };
 
 AXIS2_EXTERN axis2_msg_t *AXIS2_CALL
@@ -55,6 +57,7 @@
     msg->name = NULL;
     msg->element_qname = NULL;
     msg->direction = NULL;
+    msg->base = NULL;
 
     msg->param_container = 
         (axutil_param_container_t *)axutil_param_container_create(env);
@@ -70,7 +73,14 @@
         axis2_msg_free(msg, env);
         return NULL;
     }
-
+    
+    msg->base = axis2_desc_create(env);
+    if (!msg->base)
+    {
+        axis2_msg_free(msg, env);
+        return NULL;
+    }
+    
     return msg;
 }
 
@@ -167,6 +177,10 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     msg->parent = op;
+    if (op)
+    {
+        axis2_desc_set_parent(msg->base, env, axis2_op_get_base(op, env));
+    }
     return AXIS2_SUCCESS;
 }
 
@@ -328,4 +342,10 @@
     return AXIS2_SUCCESS;
 }
 
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_msg_get_base(const axis2_msg_t *msg,
+    const axutil_env_t *env)
+{
+    return msg->base;
+}
 

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/op.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/op.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/op.c Sun Apr 22 19:04:29
2007
@@ -355,6 +355,10 @@
         op->parent = NULL;
     }
     op->parent = svc;
+    if (svc)
+    {
+        axis2_desc_set_parent(op->base, env, axis2_svc_get_base(svc, env));
+    }
     return AXIS2_SUCCESS;
 }
 
@@ -1184,4 +1188,12 @@
 {
     return op->param_container;
 }
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_op_get_base(const axis2_op_t *op,
+    const axutil_env_t *env)
+{
+    return op->base;
+}
+
 

Added: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/policy_include.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/policy_include.c?view=auto&rev=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/policy_include.c (added)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/policy_include.c Sun Apr
22 19:04:29 2007
@@ -0,0 +1,580 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_policy_include.h>
+#include <neethi_policy.h>
+
+struct axis2_policy_include
+{
+    neethi_policy_t *policy;
+
+    neethi_policy_t *effective_policy;
+
+    neethi_registry_t *registry;
+
+    axis2_desc_t *desc;
+
+    axutil_hash_t *wrapper_elements;
+};
+
+typedef struct axis2_policy_wrapper
+{
+    int type;
+    void *value;
+} axis2_policy_wrapper_t;
+
+
+AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+axis2_policy_include_create(const axutil_env_t *env)
+{
+    axis2_policy_include_t *policy_include = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    policy_include = (axis2_policy_include_t *) AXIS2_MALLOC(env->allocator,
+        sizeof(axis2_policy_include_t));
+
+    if (!policy_include)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    policy_include->policy = NULL;
+    policy_include->effective_policy = NULL;
+    policy_include->registry = NULL;
+    policy_include->desc = NULL;
+    policy_include->wrapper_elements = NULL;
+
+    policy_include->registry = neethi_registry_create(env);
+    if (!policy_include->registry)
+    {
+        axis2_policy_include_free(policy_include, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    policy_include->wrapper_elements = axutil_hash_make(env);
+    if (!policy_include->wrapper_elements)
+    {
+        axis2_policy_include_free(policy_include, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    return policy_include;
+}
+
+AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+axis2_policy_include_create_with_desc(const axutil_env_t *env,
+    axis2_desc_t *desc)
+{
+    axis2_policy_include_t *policy_include = NULL;
+    axis2_desc_t *parent_desc = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    policy_include = (axis2_policy_include_t *) axis2_policy_include_create(env);
+    
+    parent_desc = axis2_desc_get_parent(desc, env);
+    
+    if (parent_desc)
+    {
+        axis2_policy_include_t *preant_policy_include = 
+            axis2_desc_get_policy_include(parent_desc, env);
+        if (preant_policy_include)
+        {
+            /* TODO : uncomment when neethi_registry_create_with_parent implemented
+            policy_include->registry = neethi_registry_create_with_parent(env, 
+                axis2_policy_include_get_registry(preant_policy_include, env));
+            */
+        }
+        else
+        {
+            policy_include->registry = neethi_registry_create(env);
+        }
+    }
+    else
+    {
+        policy_include->registry = neethi_registry_create(env);
+    }
+    
+    policy_include->desc = desc;
+    
+    return policy_include;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_policy_include_free(
+    axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, void);
+
+    if (policy_include->registry)
+    {
+        neethi_registry_free(policy_include->registry, env);
+    }
+
+    if (policy_include->wrapper_elements)
+    {
+        axutil_hash_free(policy_include->wrapper_elements, env);
+    }
+
+    if (policy_include)
+    {
+        AXIS2_FREE(env->allocator, policy_include);
+    }
+
+    return;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_set_registry(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env, 
+    neethi_registry_t *registry)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if (policy_include->registry)
+    {
+        neethi_registry_free(policy_include->registry, env);
+    }
+    
+    policy_include->registry = registry;
+    
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN neethi_registry_t *AXIS2_CALL
+axis2_policy_include_get_registry(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    return policy_include->registry;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_set_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env, 
+    neethi_policy_t *policy)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    if (policy_include->wrapper_elements)
+    {
+        axutil_hash_free(policy_include->wrapper_elements, env);
+        policy_include->wrapper_elements = NULL;
+    }
+    
+    policy_include->wrapper_elements = axutil_hash_make(env);
+
+    if (!neethi_policy_get_name(policy, env) && 
+        !neethi_policy_get_id(policy, env))
+    {
+        neethi_policy_set_id(policy, env, 
+            axutil_uuid_gen(env));
+    }
+
+    if (policy_include->wrapper_elements)
+    {
+        axis2_policy_wrapper_t *wrapper = NULL;
+
+        wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_policy_wrapper_t));
+        if (wrapper)
+        {
+            axis2_char_t *policy_name = NULL;
+            wrapper->type = AXIS2_ANON_POLICY;
+            wrapper->value = policy;
+            
+            /* TODO: uncomment when neethi_policy_get_name done
+            policy_name = neethi_policy_get_name(policy, env);
+            */
+            
+            if (policy_name)
+            {
+                axutil_hash_set(policy_include->wrapper_elements, policy_name,
+                    AXIS2_HASH_KEY_STRING, wrapper);
+            }
+            else
+            {
+                /* TODO: uncomment when neethi_policy_get_id done
+                axutil_hash_set(policy_include->wrapper_elements, 
+                    neethi_policy_get_id(policy, env),
+                    AXIS2_HASH_KEY_STRING, wrapper);
+                */
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_update_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env, 
+    neethi_policy_t *policy)
+{
+    axis2_char_t *key;
+    axis2_policy_wrapper_t *wrapper = NULL;
+
+    /* TODO: uncomment when neethi_policy_get_name & neethi_policy_get_id done
+    key = neethi_policy_get_name(policy, env);
+    if (!key)
+        key = neethi_policy_get_id(policy, env);
+    */
+
+    if (!key)
+    {
+        return AXIS2_FAILURE;
+    }
+
+    wrapper = axutil_hash_get(policy_include->wrapper_elements, key,
+        AXIS2_HASH_KEY_STRING);
+    if(wrapper)
+    {
+        wrapper->value = policy;
+        return AXIS2_SUCCESS;
+    }
+    
+    return AXIS2_FAILURE;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_set_effective_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env, 
+    neethi_policy_t *effective_policy)
+{
+    policy_include->effective_policy = effective_policy;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_set_desc(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env, 
+    axis2_desc_t *desc)
+{
+    policy_include->desc = desc;
+    return AXIS2_SUCCESS;
+}        
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_policy_include_get_desc(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    return policy_include->desc;
+}
+
+AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
+axis2_policy_include_get_parent(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    if (policy_include->desc)
+    {
+        axis2_desc_t *parent = NULL;
+        parent = axis2_desc_get_parent(policy_include->desc, env);
+        if (parent)
+        {
+            return axis2_desc_get_policy_include(parent, env);
+        }
+    }
+
+    return NULL;
+}
+
+static axis2_status_t
+axis2_policy_include_calculate_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    neethi_policy_t *result = NULL;
+    axutil_hash_index_t *hi = NULL;
+    void *val = NULL;
+
+    for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
+        hi = axutil_hash_next(env, hi))
+    {
+        axis2_policy_wrapper_t *wrapper = NULL;
+
+        axutil_hash_this(hi, NULL, NULL, &val);
+        wrapper = (axis2_policy_wrapper_t *)val;
+
+        if (wrapper)
+        {
+            neethi_policy_t *policy = NULL;
+            if (wrapper->type != AXIS2_ANON_POLICY) 
+            {
+                neethi_reference_t *reference = 
+                    (neethi_reference_t *)wrapper->value;
+                if (reference)
+                {
+                    policy = (neethi_policy_t*) neethi_reference_normalize(
+                        reference, env, policy_include->registry, AXIS2_FALSE);
+                }
+            } 
+            else 
+            {
+                policy = (neethi_policy_t *)wrapper->value;
+            } 
+
+            /* TODO: uncomment when neethi_policy_merge done
+            result = (result == NULL) ? (neethi_policy_t) policy : 
+                (neethi_policy_t*) neethi_policy_merge(result, env, policy);
+           */
+        }
+    }
+
+    policy_include->policy = result;
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+axis2_policy_include_calculate_effective_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{    
+    neethi_policy_t *result;
+    axis2_policy_include_t *parent = NULL;
+
+    parent = axis2_policy_include_get_parent(policy_include, env);
+
+    if (parent) 
+    {
+        neethi_policy_t *parent_policy =
+            axis2_policy_include_get_effective_policy(parent, 
+                env);
+
+        if (!parent_policy) 
+        {
+            result = axis2_policy_include_get_policy(policy_include, env);
+
+        } 
+        else 
+        {
+            if (axis2_policy_include_get_policy(policy_include, env)) 
+            {
+                result = (neethi_policy_t*) neethi_policy_merge(parent_policy,
+                    env, axis2_policy_include_get_policy(policy_include, env));
+
+            } 
+            else 
+            {
+                result = parent_policy;
+            }
+        }
+    } 
+    else 
+    {
+        result = axis2_policy_include_get_policy(policy_include, env);
+    }
+    
+    policy_include->effective_policy = result;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+axis2_policy_include_get_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    axis2_policy_include_calculate_policy(policy_include, env);
+    return policy_include->policy;
+}
+
+AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+axis2_policy_include_get_effective_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    axis2_policy_include_calculate_effective_policy(policy_include, env);
+    return policy_include->effective_policy;
+}
+
+AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+axis2_policy_include_get_policy_elements(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{
+    axutil_array_list_t *policy_elements_list = NULL;
+    axutil_hash_index_t *hi = NULL;
+    void *val = NULL;
+
+    policy_elements_list = axutil_array_list_create(env, 10);
+
+    for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
+        hi = axutil_hash_next(env, hi))
+    {
+        axis2_policy_wrapper_t *wrapper = NULL;
+
+        axutil_hash_this(hi, NULL, NULL, &val);
+        wrapper = (axis2_policy_wrapper_t *)val;
+
+        if (wrapper)
+        {
+            axutil_array_list_add(policy_elements_list, env, wrapper->value);
+        }
+    }
+    return policy_elements_list;
+}
+
+AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+axis2_policy_include_get_policy_elements_with_type(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    int type)
+{
+    axutil_array_list_t *policy_elements_list = NULL;
+    axutil_hash_index_t *hi = NULL;
+    void *val = NULL;
+
+    policy_elements_list = axutil_array_list_create(env, 10);
+
+    for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
+        hi = axutil_hash_next(env, hi))
+    {
+        axis2_policy_wrapper_t *wrapper = NULL;
+
+        axutil_hash_this(hi, NULL, NULL, &val);
+        wrapper = (axis2_policy_wrapper_t *)val;
+
+        if (wrapper && wrapper->type == type)
+        {
+            axutil_array_list_add(policy_elements_list, env, wrapper->value);
+        }
+    }
+    return policy_elements_list;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_register_policy(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    axis2_char_t *key,
+    neethi_policy_t *policy)
+{
+    if (policy_include->registry)
+    {
+        return neethi_registry_register(policy_include->registry, env, key, 
+            policy);
+    }
+    return AXIS2_FAILURE;
+}
+
+AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
+axis2_policy_include_get_policy_with_key(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    axis2_char_t *key)
+{
+    if (policy_include->registry)
+    {
+        return neethi_registry_lookup(policy_include->registry, env, key);
+    }
+    return NULL;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_add_policy_element(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    int type,
+    neethi_policy_t *policy)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    if (!neethi_policy_get_name(policy, env) && 
+        !neethi_policy_get_id(policy, env))
+    {
+        neethi_policy_set_id(policy, env, 
+            axutil_uuid_gen(env));
+    }
+
+    if (policy_include->wrapper_elements)
+    {
+        axis2_policy_wrapper_t *wrapper = NULL;
+
+        wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_policy_wrapper_t));
+        if (wrapper)
+        {
+            axis2_char_t *policy_name = NULL;
+            wrapper->type = type;
+            wrapper->value = policy;
+            
+    /* TODO: uncomment when neethi_policy_get_name & neethi_policy_get_id done
+            policy_name = neethi_policy_get_name(policy, env);
+            if (!policy_name)
+                policy_name = neethi_policy_get_id(policy, env);
+            */
+            
+            if (policy_name)
+            {
+                axutil_hash_set(policy_include->wrapper_elements, policy_name,
+                    AXIS2_HASH_KEY_STRING, wrapper);
+                if (policy_include->registry)
+                {
+                    neethi_registry_register(policy_include->registry, 
+                        env, policy_name, policy);
+                }
+                return AXIS2_SUCCESS;
+            }
+        }
+    }
+    return AXIS2_FAILURE;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_add_policy_reference_element(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    int type,
+    neethi_reference_t *reference)
+{
+    axis2_policy_wrapper_t *wrapper = NULL;
+
+    wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
+        sizeof(axis2_policy_wrapper_t));
+    if (wrapper)
+    {
+        wrapper->type = type;
+        wrapper->value = reference;
+        axutil_hash_set(policy_include->wrapper_elements, 
+            neethi_reference_get_uri(reference, env),
+            AXIS2_HASH_KEY_STRING, wrapper);
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_remove_policy_element(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env,
+    axis2_char_t *policy_uri)
+{  
+    if (policy_include->wrapper_elements)
+    {
+        axutil_hash_set(policy_include->wrapper_elements,
+            policy_uri,
+            AXIS2_HASH_KEY_STRING, NULL);
+    }
+    if (policy_include->registry)
+    {
+         neethi_registry_register(policy_include->registry,
+            env, policy_uri, NULL);
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_policy_include_remove_all_policy_element(axis2_policy_include_t *policy_include,
+    const axutil_env_t *env)
+{    
+    if (policy_include->wrapper_elements)
+    {
+        axutil_hash_free(policy_include->wrapper_elements, env);
+    }
+    return AXIS2_SUCCESS;
+}
+

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc.c Sun Apr 22 19:04:29
2007
@@ -93,6 +93,8 @@
     struct axutil_param_container *param_container;
     /** flow container that encapsulates the flow related data */
     struct axis2_flow_container *flow_container;
+    /** base description struct */
+    axis2_desc_t *base;
 };
 
 AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
@@ -136,6 +138,7 @@
     svc->impl_class = NULL;
     svc->qname = NULL;
     svc->style = NULL;
+    svc->base = NULL;
 
     svc->param_container = axutil_param_container_create(env);
     if (! svc->param_container)
@@ -216,6 +219,13 @@
     }
     svc->target_ns_prefix = axutil_strdup(env, "tns");
     svc->sc_calc_count = 0;
+    
+    svc->base = axis2_desc_create(env);
+    if (!svc->base)
+    {
+        axis2_svc_free(svc, env);
+        return NULL;
+    }
 
     return svc;
 }
@@ -473,6 +483,10 @@
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
 
     svc->parent = svc_grp;
+    if (svc_grp)
+    {
+        axis2_desc_set_parent(svc->base, env, axis2_svc_grp_get_base(svc_grp, env));
+    }
 
     return AXIS2_SUCCESS;
 }
@@ -1084,3 +1098,12 @@
     svc->wsdl_path = (axis2_char_t *)wsdl_path;
     return AXIS2_SUCCESS;
 }
+
+
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_svc_get_base(const axis2_svc_t *svc,
+    const axutil_env_t *env)
+{
+    return svc->base;
+}
+

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc_grp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc_grp.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc_grp.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/description/svc_grp.c Sun Apr 22 19:04:29
2007
@@ -32,6 +32,8 @@
     axutil_array_list_t *module_list;
     /** parameter container to hold service related parameters */
     axutil_param_container_t *param_container;
+    /** base description struct */
+    axis2_desc_t *base;
 };
 
 AXIS2_EXTERN axis2_svc_grp_t *AXIS2_CALL
@@ -55,6 +57,7 @@
     svc_grp->parent = NULL;
     svc_grp->svc_grp_name = NULL;
     svc_grp->module_list = NULL;
+    svc_grp->base = NULL;
 
     svc_grp->param_container =  axutil_param_container_create(env);
     if (!svc_grp->param_container)
@@ -87,6 +90,13 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
+    
+    svc_grp->base = axis2_desc_create(env);
+    if (!svc_grp->base)
+    {
+        axis2_svc_grp_free(svc_grp, env);
+        return NULL;
+    }
 
     return svc_grp;
 }
@@ -104,6 +114,10 @@
     svc_grp = (axis2_svc_grp_t *) axis2_svc_grp_create(env);
     if (svc_grp)
         svc_grp->parent = conf;
+    if (conf)
+    {
+        axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(conf, env));
+    }
 
     return svc_grp;
 
@@ -410,6 +424,10 @@
     if (svc_grp->parent)
          axis2_conf_free(svc_grp->parent, env);
     svc_grp->parent = parent;
+    if (parent)
+    {
+        axis2_desc_set_parent(svc_grp->base, env, axis2_conf_get_base(parent, env));
+    }
     return AXIS2_SUCCESS;
 }
 
@@ -559,4 +577,10 @@
     return svc_grp->param_container;
 }
 
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_svc_grp_get_base(const axis2_svc_grp_t *svc_grp,
+    const axutil_env_t *env)
+{
+    return svc_grp->base;
+}
 

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/Makefile.am?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/Makefile.am Sun Apr 22 19:04:29
2007
@@ -23,6 +23,7 @@
 					$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
 					$(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la \
 					$(top_builddir)/util/src/libaxutil.la \
+					$(top_builddir)/neethi/src/libneethi.la \
 					$(top_builddir)/axiom/src/om/libaxis2_axiom.la 
 
 INCLUDES = 	-I$(top_builddir)/include \

Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c?view=diff&rev=531315&r1=531314&r2=531315
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c Sun Apr 22 19:04:29 2007
@@ -55,6 +55,8 @@
     axis2_bool_t enable_security;
     /** configuration parameter container */
     axutil_param_container_t *param_container;
+    /** base description struct */
+    axis2_desc_t *base;
 };
 
 AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
@@ -96,6 +98,7 @@
     conf->handlers = NULL;
     conf->enable_mtom = AXIS2_FALSE;
     conf->enable_security = AXIS2_FALSE;
+    conf->base = NULL;
 
     conf->param_container = (axutil_param_container_t *)
             axutil_param_container_create(env);
@@ -245,6 +248,13 @@
         return NULL;
     }
 
+    conf->base = axis2_desc_create(env);
+    if (!conf->base)
+    {
+        axis2_conf_free(conf, env);
+        return NULL;
+    }
+
     return conf;
 }
 
@@ -1590,3 +1600,9 @@
     return conf->param_container;
 }
 
+AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
+axis2_conf_get_base(const axis2_conf_t *conf,
+    const axutil_env_t *env)
+{
+    return conf->base;
+}



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