axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r359728 [1/2] - in /webservices/axis2/trunk/c/modules/core/deployment: Makefile.am arch_file_data.c arch_reader.c axis2_deployment.h dep_engine.c desc_builder.c phases_info.c repos_listener.c ws_info.c ws_info_list.c
Date Thu, 29 Dec 2005 06:04:18 GMT
Author: damitha
Date: Wed Dec 28 22:04:05 2005
New Revision: 359728

URL: http://svn.apache.org/viewcvs?rev=359728&view=rev
Log:
Moved files from src to module folder

Added:
    webservices/axis2/trunk/c/modules/core/deployment/Makefile.am
    webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
    webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
    webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
    webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c
    webservices/axis2/trunk/c/modules/core/deployment/ws_info.c
    webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c

Added: webservices/axis2/trunk/c/modules/core/deployment/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/Makefile.am?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/Makefile.am (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/Makefile.am Wed Dec 28 22:04:05 2005
@@ -0,0 +1,17 @@
+lib_LTLIBRARIES = libaxis2_deployment.la
+AM_CPPFLAGS = $(CPPFLAGS)
+libaxis2_deployment_la_SOURCES = phases_info.c \
+                                    desc_builder.c \
+                                    dep_engine.c \
+                                    arch_reader.c
+
+libaxis2_deployment_la_LIBADD = 
+INCLUDES = -I${CUTEST_HOME}/include -I$(top_builddir)/include \
+            -I$(top_builddir)/modules/xml/guththila/src \
+            -I$(top_builddir)/modules/util/src \
+            -I$(top_builddir)/modules/wsdl/src \
+            -I$(top_builddir)/modules/core/transport \
+            -I$(top_builddir)/modules/core/description/src \
+            -I$(top_builddir)/modules/core/deployment/src \
+            -I$(top_builddir)/modules/xml/parser \
+            -I$(top_builddir)/modules/platforms

Added: webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,441 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_arch_file_data.h>
+#include <string.h>
+#include <axis2_class_loader.h>
+
+/** 
+ * @brief
+ * ArchiveFileData = Hot Deployment File Item.
+ * To store infromation of the 
+ * module or service item to be deployed
+ */
+typedef struct axis2_arch_file_data_impl
+{
+	axis2_arch_file_data_t arch_file_data;
+    axis2_char_t *file_name;
+    int type;
+    axis2_char_t *msg_recv;
+    axis2_char_t *module_dll_name;
+    axis2_char_t *name;
+    /*
+     * To store services in a serviceGroup. If there are wsdl for those 
+     * servics ,so wsdl service will be created for each wsdl an those will be 
+     * temporarily store in this table
+     */
+    axis2_hash_t *svc_map;
+    axis2_array_list_t *deployable_svcs;
+    	
+} axis2_arch_file_data_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(arch_file_data) \
+    ((axis2_arch_file_data_impl_t *) arch_file_data)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_arch_file_data_free (axis2_arch_file_data_t *arch_file_data, 
+                            axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_msg_recv(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_msg_recv(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *msg_recv);
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_svc_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+int AXIS2_CALL
+axis2_arch_file_data_get_type(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_file_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_module_dll_name(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_module_dll_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *module_dll_name);
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_add_svc(axis2_arch_file_data_t *file_data,
+                                axis2_env_t **env,
+                                struct axis2_svc *svc_desc);
+
+struct axis2_svc *AXIS2_CALL
+axis2_arch_file_data_get_svc(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *svc_name);
+
+axis2_hash_t *AXIS2_CALL
+axis2_arch_file_data_get_svc_map(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_arch_file_data_get_deployable_svcs(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_deployable_svcs(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_array_list_t *deployable_svcs);
+
+                                
+/************************** End of function prototypes ************************/
+
+axis2_arch_file_data_t * AXIS2_CALL 
+axis2_arch_file_data_create(axis2_env_t **env)
+{
+    axis2_arch_file_data_impl_t *arch_file_data_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+	
+	arch_file_data_impl = (axis2_arch_file_data_impl_t *) AXIS2_MALLOC((*env)->
+        allocator, sizeof(axis2_arch_file_data_impl_t));
+	
+	
+	if(NULL == arch_file_data_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    arch_file_data_impl->file_name = NULL;
+    arch_file_data_impl->type = 0;
+    arch_file_data_impl->msg_recv = NULL;
+    arch_file_data_impl->module_dll_name = NULL;
+    arch_file_data_impl->name = NULL;
+    arch_file_data_impl->svc_map = NULL;
+    arch_file_data_impl->deployable_svcs = NULL;
+    arch_file_data_impl->arch_file_data.ops = NULL;
+    
+	arch_file_data_impl->arch_file_data.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_arch_file_data_ops_t));
+	if(NULL == arch_file_data_impl->arch_file_data.ops)
+    {
+        axis2_arch_file_data_free(&(arch_file_data_impl->arch_file_data), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+	arch_file_data_impl->arch_file_data.ops->free =  axis2_arch_file_data_free;
+    arch_file_data_impl->arch_file_data.ops->get_msg_recv = 
+        axis2_arch_file_data_get_msg_recv;
+    arch_file_data_impl->arch_file_data.ops->set_msg_recv = 
+        axis2_arch_file_data_set_msg_recv;
+    arch_file_data_impl->arch_file_data.ops->get_name = 
+        axis2_arch_file_data_get_name;
+    arch_file_data_impl->arch_file_data.ops->get_svc_name = 
+        axis2_arch_file_data_get_svc_name;
+    arch_file_data_impl->arch_file_data.ops->get_type = 
+        axis2_arch_file_data_get_type;
+    arch_file_data_impl->arch_file_data.ops->get_file_name = 
+        axis2_arch_file_data_get_file_name;
+    arch_file_data_impl->arch_file_data.ops->get_module_dll_name = 
+        axis2_arch_file_data_get_module_dll_name;
+    arch_file_data_impl->arch_file_data.ops->set_module_dll_name =
+        axis2_arch_file_data_set_module_dll_name;
+    arch_file_data_impl->arch_file_data.ops->add_svc = 
+        axis2_arch_file_data_add_svc;
+    arch_file_data_impl->arch_file_data.ops->get_svc =
+        axis2_arch_file_data_get_svc;    
+    arch_file_data_impl->arch_file_data.ops->get_svc_map = 
+        axis2_arch_file_data_get_svc_map;
+    arch_file_data_impl->arch_file_data.ops->get_deployable_svcs = 
+        axis2_arch_file_data_get_deployable_svcs;
+    arch_file_data_impl->arch_file_data.ops->set_deployable_svcs =
+        axis2_arch_file_data_set_deployable_svcs;    
+	
+	return &(arch_file_data_impl->arch_file_data);
+}
+
+axis2_arch_file_data_t * AXIS2_CALL 
+axis2_arch_file_data_create_with_type_and_file_name(axis2_env_t **env,
+                                                    int type,
+                                                    axis2_char_t *file_name)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    file_data_impl = (axis2_arch_file_data_impl_t *) 
+        axis2_arch_file_data_create(env);
+    if(NULL == file_data_impl)
+    {
+        return NULL;
+    }
+    file_data_impl->type = type;
+    file_data_impl->file_name = AXIS2_STRDUP(file_name, env);
+    return &(file_data_impl->arch_file_data);    
+}
+
+axis2_arch_file_data_t * AXIS2_CALL 
+axis2_arch_file_data_create_with_type_and_name(axis2_env_t **env,
+                                                    int type,
+                                                    axis2_char_t *name)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    file_data_impl = (axis2_arch_file_data_impl_t *)
+        axis2_arch_file_data_create(env);
+    if(NULL == file_data_impl)
+    {
+        return NULL;
+    }
+    file_data_impl->type = type;
+    file_data_impl->name = AXIS2_STRDUP(name, env);
+    return &(file_data_impl->arch_file_data);    
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_arch_file_data_free (axis2_arch_file_data_t *arch_file_data, 
+                            axis2_env_t **env)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(arch_file_data, env, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(arch_file_data);
+    
+    if(file_data_impl->file_name)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->file_name);
+        file_data_impl->file_name = NULL;        
+    }
+    if(file_data_impl->msg_recv)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->msg_recv);
+        file_data_impl->msg_recv = NULL;        
+    }
+    if(file_data_impl->module_dll_name)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->module_dll_name);
+        file_data_impl->module_dll_name = NULL;        
+    }
+    if(file_data_impl->name)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->name);
+        file_data_impl->name = NULL;        
+    }
+    
+    if(file_data_impl->svc_map)
+    {
+        axis2_hash_free(file_data_impl->svc_map, env);
+        file_data_impl->svc_map = NULL;        
+    }
+    if(file_data_impl->deployable_svcs)
+    {
+        AXIS2_ARRAY_LIST_FREE(file_data_impl->deployable_svcs, env);
+        file_data_impl->deployable_svcs = NULL;        
+    }
+    
+    file_data_impl->arch_file_data.ops = NULL;
+    
+	if(NULL != arch_file_data->ops)
+    {
+        AXIS2_FREE((*env)->allocator, arch_file_data->ops);
+        arch_file_data->ops = NULL;
+    }
+    
+    if(file_data_impl)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl);
+        file_data_impl = NULL;
+    }
+    
+	return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_msg_recv(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->msg_recv;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_msg_recv(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *msg_recv)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, msg_recv, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    if(file_data_impl->msg_recv)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->msg_recv);
+        file_data_impl->msg_recv = NULL;
+    }
+    file_data_impl->msg_recv = AXIS2_STRDUP(msg_recv, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->file_name;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_svc_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    axis2_char_t *svc_name = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    if(NULL != file_data_impl->file_name)
+    {
+        svc_name = file_data_impl->file_name;
+    }
+    else
+    {
+        svc_name = file_data_impl->name;
+    }
+    return svc_name;
+}
+
+int AXIS2_CALL
+axis2_arch_file_data_get_type(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    return AXIS2_INTF_TO_IMPL(file_data)->type;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_file_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->file_name;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_module_dll_name(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->module_dll_name;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_module_dll_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *module_dll_name) 
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_dll_name, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    if(file_data_impl->module_dll_name)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->module_dll_name);
+        file_data_impl->module_dll_name = NULL;
+    }
+    file_data_impl->module_dll_name = module_dll_name;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_add_svc(axis2_arch_file_data_t *file_data,
+                                axis2_env_t **env,
+                                struct axis2_svc *svc_desc)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    axis2_qname_t *svc_qname = NULL;
+    axis2_char_t *svc_name = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc_desc, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    
+    svc_qname = AXIS2_SVC_GET_QNAME(svc_desc, env);
+    svc_name = AXIS2_QNAME_GET_LOCALPART(svc_qname, env);
+    
+    axis2_hash_set(file_data_impl->svc_map, svc_name, AXIS2_HASH_KEY_STRING,
+        svc_desc);
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_svc *AXIS2_CALL
+axis2_arch_file_data_get_svc(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *svc_name)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    struct axis2_svc *svc = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc_name, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    svc = (struct axis2_svc *) axis2_hash_get(file_data_impl->svc_map, svc_name, 
+        AXIS2_HASH_KEY_STRING);
+    return svc;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_arch_file_data_get_svc_map(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->svc_map;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_arch_file_data_get_deployable_svcs(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    return AXIS2_INTF_TO_IMPL(file_data)->deployable_svcs;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_deployable_svcs(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_array_list_t *deployable_svcs) 
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, deployable_svcs, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    if(file_data_impl->deployable_svcs)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->deployable_svcs);
+        file_data_impl->deployable_svcs = NULL;
+    }
+    file_data_impl->deployable_svcs = deployable_svcs;
+    return AXIS2_SUCCESS;
+}

Added: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_arch_reader.h>
+#include <string.h>
+#include <axis2_class_loader.h>
+
+/** 
+ * @brief
+ * To do the common tasks for all Builder
+ */ 
+typedef struct axis2_arch_reader_impl
+{
+	axis2_arch_reader_t arch_reader;
+    
+    	
+} axis2_arch_reader_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(arch_reader) \
+    ((axis2_arch_reader_impl_t *) arch_reader)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_arch_reader_free (axis2_arch_reader_t *arch_reader, 
+                            axis2_env_t **env);
+
+
+
+                                
+/************************** End of function prototypes ************************/
+
+axis2_arch_reader_t * AXIS2_CALL 
+axis2_arch_reader_create_with_input_stream_and_dep_engine (axis2_env_t **env)
+{
+    axis2_arch_reader_impl_t *arch_reader_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+	
+	arch_reader_impl = (axis2_arch_reader_impl_t *) AXIS2_MALLOC((*env)->
+        allocator, sizeof(axis2_arch_reader_impl_t));
+	
+	
+	if(NULL == arch_reader_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    arch_reader_impl->arch_reader.ops = NULL;
+    
+	arch_reader_impl->arch_reader.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_arch_reader_ops_t));
+	if(NULL == arch_reader_impl->arch_reader.ops)
+    {
+        axis2_arch_reader_free(&(arch_reader_impl->arch_reader), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+	arch_reader_impl->arch_reader.ops->free =  axis2_arch_reader_free;
+	
+	return &(arch_reader_impl->arch_reader);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_arch_reader_free (axis2_arch_reader_t *arch_reader, 
+                            axis2_env_t **env)
+{
+    axis2_arch_reader_impl_t *feature_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(arch_reader, env, AXIS2_FAILURE);
+    
+    feature_impl = AXIS2_INTF_TO_IMPL(arch_reader);
+    
+	if(NULL != arch_reader->ops)
+        AXIS2_FREE((*env)->allocator, arch_reader->ops);
+    
+    AXIS2_FREE((*env)->allocator, feature_impl);
+    feature_impl = NULL;
+    
+	return AXIS2_SUCCESS;
+}

Added: webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Wed Dec 28 22:04:05 2005
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_DEPLOYMENT_H
+#define AXIS2_DEPLOYMENT_H
+
+/**
+ * @file axis2_axis2_deployment.h
+ * @brief axis2 deployment
+ */
+ 
+#include <axis2.h>
+#include <axis2_error.h>
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2_allocator.h>
+#include <axis2_string.h>
+#include <axis2_hash.h>
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+
+/*********************************** Constansts********************************/
+
+/**
+ * DeployCons interface is to keep constent value required for Deployemnt
+ */
+
+#define AXIS2_SVC 0 /* if it is a service */
+#define AXIS2_MODULE 1 /* if it is a module */
+
+#define AXIS2_META_INF "META-INF"
+#define AXIS2_SVC_XML "META-INF/services.xml"
+#define AXIS2_SVC_WSDL_NAME "service.wsdl"
+#define AXIS2_SVC_WSDL_WITH_FOLDER "META-INF/service.wsdl"
+#define AXIS2_MODULEXML "META-INF/module.xml"
+#define AXIS2_PARAMETERST "parameter" /* paramater start tag */
+#define AXIS2_LISTENERST "listener" /* paramater start tag */
+#define AXIS2_HANDLERST "handler"
+#define AXIS2_MODULEST "module"
+#define AXIS2_MODULECONFIG "moduleConfig"
+#define AXIS2_PHASEST "phase"
+#define AXIS2_PHASE_ORDER "phaseOrder"
+#define AXIS2_TYPEMAPPINGST "typeMapping" /* typeMapping start tag */
+#define AXIS2_BEANMAPPINGST "beanMapping" /* beanMapping start tag */
+#define AXIS2_OPERATIONST "operation" /* operation start tag */
+#define AXIS2_INFLOWST "inflow" /* inflow start tag */
+#define AXIS2_OUTFLOWST "outflow" /* outflowr start tag */
+#define AXIS2_IN_FAILTFLOW "INfaultflow" /* faultflow start tag */
+#define AXIS2_OUT_FAILTFLOW "Outfaultflow" /* faultflow start tag */
+
+/* #define AXIS2_FOLDE_NAME "D:/Axis 2.0/projects/Deployement/test-data" */
+#define AXIS2_MODULE_PATH "/modules/"
+#define AXIS2_SVC_PATH "/services/"
+
+/* for jws file extension */
+#define AXIS2_JWS_EXTENSION ".jws"
+
+#define AXIS2_SVCTAG "service"
+#define AXIS2_CONFIG "axisconfig"
+
+/* for serviemetadat */
+#define AXIS2_STYLENAME "style"
+#define AXIS2_CONTEXTPATHNAME "contextPath"
+
+/* for parameters */
+#define AXIS2_ATTNAME "name"
+#define AXIS2_ATTLOCKED "locked"
+#define AXIS2_TYPE "type"
+
+/* for operatiins */
+#define AXIS2_ATQNAME "name"
+#define AXIS2_ATUSE "use"
+#define AXIS2_MEP "mep"
+
+/* for handlers */
+#define AXIS2_REF "ref"
+#define AXIS2_CLASSNAME "class"
+#define AXIS2_BEFORE "before"
+#define AXIS2_AFTER "after"
+#define AXIS2_PHASE "phase"
+#define AXIS2_PHASEFIRST "phaseFirst"
+#define AXIS2_PHASELAST "phaseLast"
+#define AXIS2_ORDER "order"  /* to resolve the order tag */
+#define AXIS2_DESCRIPTION "description"
+
+#define AXIS2_TRANSPORTSTAG "transports"
+#define AXIS2_TRANSPORTTAG "transport"
+#define AXIS2_TRANSPORTSENDER "transportSender"
+#define AXIS2_TRANSPORTRECEIVER "transportReceiver"
+
+#define AXIS2_MESSAGERECEIVER "messageReceiver"
+
+
+#define AXIS2_HOTDEPLOYMENT "hotdeployment"
+#define AXIS2_HOTUPDATE "hotupdate"
+#define AXIS2_EXTRACTSVCARCHIVE "extractServiceArchive"
+#define AXIS2_DISPATCH_ORDER "dispatchOrder"
+#define AXIS2_DISPATCHER "dispatcher"
+
+#define AXIS2_STORAGE "axisStorage"
+
+/* element in a services.xml */
+#define AXIS2_SVC_ELEMENT "service"
+#define AXIS2_SVC_GROUP_ELEMENT "serviceGroup"
+	
+/*********************************** Constants*********************************/	
+	
+	
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_DEPLOYMENT_H */

Added: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_dep_engine.h>
+
+/** 
+ * @brief DLL Description struct impl
+ * Axis2 DLL Description impl  
+ */ 
+typedef struct axis2_dep_engine_impl
+{
+	axis2_dep_engine_t dep_engine;
+    
+    /**
+     * to keep a ref to engine register
+     * this ref will pass to engine when it call start()
+     * method
+     */
+    struct axis2_conf *axis_config;
+    
+} axis2_dep_engine_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(dep_engine) ((axis2_dep_engine_impl_t *) dep_engine)
+	
+/*************************** Function headers *********************************/
+
+axis2_status_t AXIS2_CALL
+axis2_dep_engine_free (axis2_dep_engine_t *dep_engine,
+                            axis2_env_t **env);
+
+struct axis2_module_desc *AXIS2_CALL
+axis2_dep_engine_get_module(axis2_dep_engine_t *dep_engine,
+                                axis2_env_t **env,
+                                axis2_qname_t *module_name);
+
+/************************* End of function headers ****************************/	
+
+axis2_dep_engine_t *AXIS2_CALL 
+axis2_dep_engine_create_with_repos_name (
+                                        axis2_env_t **env, 
+                                        axis2_char_t *repos_path)
+{
+    axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    
+	dep_engine_impl = (axis2_dep_engine_impl_t *) AXIS2_MALLOC ((*env)->allocator
+		    , sizeof (axis2_dep_engine_impl_t));
+    
+	if(NULL == dep_engine_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    dep_engine_impl->axis_config = NULL;
+    
+    dep_engine_impl->dep_engine.ops = NULL;
+    
+    dep_engine_impl->dep_engine.ops = (axis2_dep_engine_ops_t *) AXIS2_MALLOC(
+        (*env)->allocator, sizeof(axis2_dep_engine_ops_t));
+    
+	if(NULL == dep_engine_impl->dep_engine.ops)
+	{
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+	}
+    
+	dep_engine_impl->dep_engine.ops->free = axis2_dep_engine_free;
+    dep_engine_impl->dep_engine.ops->get_module = axis2_dep_engine_get_module;
+						
+	return &(dep_engine_impl->dep_engine);
+}
+
+/******************************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_dep_engine_free (axis2_dep_engine_t *dep_engine,
+                        axis2_env_t **env)
+{
+    axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(dep_engine, env, AXIS2_FAILURE);
+    
+    dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
+    
+	if(NULL != dep_engine->ops)
+    {
+		AXIS2_FREE((*env)->allocator, dep_engine->ops);
+        dep_engine->ops = NULL;
+    }
+    
+    
+	return AXIS2_SUCCESS;
+}
+
+struct axis2_module_desc *AXIS2_CALL
+axis2_dep_engine_get_module(axis2_dep_engine_t *dep_engine,
+                                axis2_env_t **env,
+                                axis2_qname_t *module_name) 
+{
+    axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(dep_engine, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, module_name, NULL);
+    
+    dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
+    return AXIS2_CONF_GET_MODULE(dep_engine_impl->axis_config, env, module_name);
+}

Added: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,819 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_desc_builder.h>
+#include <string.h>
+#include <axis2_class_loader.h>
+
+/** 
+ * @brief
+ * To do the common tasks for all Builder
+ */ 
+typedef struct axis2_desc_builder_impl
+{
+	axis2_desc_builder_t desc_builder;
+    
+    axis2_char_t *file_name;
+    struct axis2_dep_engine *engine;
+    	
+} axis2_desc_builder_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(desc_builder) \
+    ((axis2_desc_builder_impl_t *) desc_builder)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_desc_builder_free (axis2_desc_builder_t *desc_builder, 
+                            axis2_env_t **env);
+
+struct axis2_om_node *AXIS2_CALL
+axis2_build_OM(axis2_desc_builder_t *desc_builder,
+                axis2_env_t **env);
+
+
+struct axis2_flow *AXIS2_CALL
+axis2_desc_builder_process_flow(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                struct axis2_om_element *flow_element,
+                                axis2_param_container_t *parent,
+                                axis2_om_node_t *node);
+
+struct axis2_handler_desc *AXIS2_CALL
+axis2_desc_builder_process_handler(axis2_desc_builder_t *desc_builder,
+                                    axis2_env_t **env,
+                                    axis2_om_node_t *handler_element,
+                                    axis2_param_container_t *parent);
+
+
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_params(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                axis2_om_children_qname_iterator_t *params,
+                                axis2_param_container_t *param_container,
+                                axis2_param_container_t *parent );
+
+
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_op_module_refs(axis2_desc_builder_t *desc_builder,
+                          axis2_env_t **env,
+                          axis2_om_children_qname_iterator_t *module_refs, 
+                          struct axis2_op *op);
+                              
+struct axis2_msg_recv *AXIS2_CALL
+axis2_desc_builder_load_msg_recv(axis2_desc_builder_t *desc_builder,
+                                    axis2_env_t **env,
+                                    axis2_om_element_t *recv_element);
+
+struct axis2_msg_recv *AXIS2_CALL
+axis2_desc_builder_load_default_msg_recv(axis2_desc_builder_t *desc_builder,
+                                            axis2_env_t **env);
+
+
+axis2_char_t *AXIS2_CALL
+axis2_desc_builder_get_short_file_name(axis2_desc_builder_t *desc_builder,
+                                        axis2_env_t **env,
+                                        axis2_char_t *file_name);
+
+
+axis2_char_t *AXIS2_CALL
+axis2_desc_builder_get_value(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                axis2_char_t *in);
+
+                                
+/************************** End of function prototypes ************************/
+
+axis2_desc_builder_t * AXIS2_CALL 
+axis2_desc_builder_create_with_file_and_dep_engine (
+                                        axis2_env_t **env, 
+                                        axis2_char_t *file_name, 
+                                        struct axis2_dep_engine *engine)
+{
+    axis2_desc_builder_impl_t *desc_builder_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+	
+	desc_builder_impl = (axis2_desc_builder_impl_t *) AXIS2_MALLOC((*env)->
+        allocator, sizeof(axis2_desc_builder_impl_t));
+	
+	
+	if(NULL == desc_builder_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    desc_builder_impl->desc_builder.ops = NULL;
+    
+	desc_builder_impl->desc_builder.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_desc_builder_ops_t));
+	if(NULL == desc_builder_impl->desc_builder.ops)
+    {
+        axis2_desc_builder_free(&(desc_builder_impl->desc_builder), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+	desc_builder_impl->desc_builder.ops->free =  axis2_desc_builder_free;
+    desc_builder_impl->desc_builder.ops->build_OM = axis2_build_OM;
+    desc_builder_impl->desc_builder.ops->process_flow = 
+            axis2_desc_builder_process_flow;
+    desc_builder_impl->desc_builder.ops->process_handler = 
+            axis2_desc_builder_process_handler;
+    desc_builder_impl->desc_builder.ops->process_params = 
+            axis2_desc_builder_process_params;
+    desc_builder_impl->desc_builder.ops->process_op_module_refs = 
+            axis2_desc_builder_process_op_module_refs;
+    desc_builder_impl->desc_builder.ops->load_msg_recv = 
+            axis2_desc_builder_load_msg_recv;
+    desc_builder_impl->desc_builder.ops->load_default_msg_recv = 
+            axis2_desc_builder_load_default_msg_recv;
+    desc_builder_impl->desc_builder.ops->get_short_file_name = 
+            axis2_desc_builder_get_short_file_name;
+    desc_builder_impl->desc_builder.ops->get_value = 
+            axis2_desc_builder_get_value;  
+	
+	return &(desc_builder_impl->desc_builder);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_desc_builder_free (axis2_desc_builder_t *desc_builder, 
+                            axis2_env_t **env)
+{
+    axis2_desc_builder_impl_t *feature_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, AXIS2_FAILURE);
+    
+    feature_impl = AXIS2_INTF_TO_IMPL(desc_builder);
+    
+	if(NULL != desc_builder->ops)
+        AXIS2_FREE((*env)->allocator, desc_builder->ops);
+    
+    AXIS2_FREE((*env)->allocator, feature_impl);
+    feature_impl = NULL;
+    
+	return AXIS2_SUCCESS;
+}
+
+struct axis2_om_node *AXIS2_CALL
+axis2_build_OM(axis2_desc_builder_t *desc_builder,
+                axis2_env_t **env) 
+{
+    struct axis2_desc_builder_impl *builder_impl = NULL;
+    struct axis2_om_stax_builder *builder = NULL;
+    struct axis2_xml_reader *reader = NULL;
+    struct axis2_om_document *document = NULL;
+    struct axis2_om_node *root = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    
+    builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
+    
+    if(!builder_impl->file_name)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_DESC_BUILDER,
+            AXIS2_FAILURE);
+        return NULL;
+    }
+    /** create pull parser */
+    reader = axis2_xml_reader_create_for_file(env, builder_impl->file_name,
+        NULL);
+
+    if(!reader)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+            AXIS2_FAILURE)
+        return NULL;
+    }
+    
+    /** create axis2_om_stax_builder by parsing pull_parser struct */
+    builder = axis2_om_stax_builder_create (env, reader);
+
+    if(!builder)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+            AXIS2_FAILURE)
+        return NULL;
+    }
+    /**
+        create an om document
+        document is the container of om model created using builder
+    */
+    document = axis2_om_document_create (env, NULL, builder);
+    /**
+        get root element , building starts hear 
+     */
+    root = AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT (document, env);
+    return root;
+}
+
+struct axis2_flow *AXIS2_CALL
+axis2_desc_builder_process_flow(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                axis2_om_element_t *flow_element,
+                                axis2_param_container_t *parent,
+                                axis2_om_node_t *flow_node)
+{
+    struct axis2_flow *flow = NULL;
+    axis2_om_children_qname_iterator_t *handlers = NULL;
+    axis2_qname_t *child = NULL;
+        
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, parent, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, flow_node, NULL);
+        
+    flow = axis2_flow_create(env);
+    if(!flow)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    if(NULL == flow_element)
+    {
+        return flow;
+    }
+    
+    child = axis2_qname_create(env, AXIS2_HANDLERST, NULL, NULL); 
+    handlers = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(flow_element, env, 
+        child, flow_node);
+    while(AXIS2_TRUE == AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(handlers ,env))
+    {
+        axis2_om_node_t *handler_node = NULL;
+        struct axis2_handler_desc *handler = NULL;
+        axis2_status_t status = AXIS2_FAILURE;
+            
+        handler_node = (axis2_om_node_t *)
+            AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(handlers, env);
+        
+        handler = axis2_desc_builder_process_handler(desc_builder, env, 
+            handler_node, parent);
+        status = AXIS2_FLOW_ADD_HANDLER(flow, env, handler);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_FLOW_FREE(flow, env);
+            return NULL;
+        }
+    }
+    
+    return flow;
+}
+
+struct axis2_handler_desc *AXIS2_CALL
+axis2_desc_builder_process_handler(axis2_desc_builder_t *desc_builder,
+                                    axis2_env_t **env,
+                                    axis2_om_node_t *handler_node,
+                                    struct axis2_param_container *parent)
+{
+    axis2_handler_desc_t *handler = NULL;
+    struct axis2_om_attribute *name_attrib = NULL;
+    axis2_qname_t *attr_qname = NULL;
+    struct axis2_om_attribute *class_attrib = NULL;
+    axis2_qname_t *class_qname = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *attrib_value = NULL;
+    axis2_om_element_t *handler_element = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, handler_element, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, parent, NULL);
+    
+    handler = axis2_handler_desc_create_with_qname(env, NULL);
+    if(!handler)
+    {
+        return NULL;
+    }
+    /* Setting Handler name */
+    attr_qname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
+    if(!attr_qname)
+    {
+        AXIS2_HANDLER_DESC_FREE(handler, env);
+        return NULL;
+    }
+    handler_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(handler_node, env);
+    name_attrib = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(handler_element, env, 
+        attr_qname);
+    if(NULL == name_attrib)
+    {
+        AXIS2_HANDLER_DESC_FREE(handler, env);
+        AXIS2_QNAME_FREE(attr_qname, env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE,
+            AXIS2_FAILURE);
+        return NULL;
+    }
+    else
+    {
+        axis2_qname_t *handler_qname = NULL;
+        axis2_char_t *value = NULL;
+        
+        value = AXIS2_OM_ATTRIBUTE_GET_VALUE(name_attrib, env);
+        handler_qname = axis2_qname_create(env, value, NULL, NULL); 
+        if(!handler_qname)
+        {
+            AXIS2_HANDLER_DESC_FREE(handler, env);
+            AXIS2_QNAME_FREE(attr_qname, env);
+            return NULL;
+        }
+        status = AXIS2_HANDLER_DESC_SET_QNAME(handler, env, handler_qname);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_HANDLER_DESC_FREE(handler, env);
+            AXIS2_QNAME_FREE(attr_qname, env);
+            AXIS2_QNAME_FREE(handler_qname, env);
+            return NULL;
+        }  
+        AXIS2_QNAME_FREE(handler_qname, env);        
+    }
+
+    /*Setting Handler Class name */
+    
+    class_qname = axis2_qname_create(env, AXIS2_CLASSNAME, NULL, NULL);
+    class_attrib = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(handler_element, env,
+        class_qname);
+        
+    AXIS2_QNAME_FREE(class_qname, env);
+    
+    if(NULL == class_attrib)
+    {
+        AXIS2_HANDLER_DESC_FREE(handler, env);
+        AXIS2_QNAME_FREE(attr_qname, env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE,
+            AXIS2_FAILURE);
+        return NULL;   
+    }
+    else
+    {   
+        attrib_value = AXIS2_OM_ATTRIBUTE_GET_VALUE(class_attrib, env);
+        status = AXIS2_HANDLER_DESC_SET_CLASS_NAME(handler, env, attrib_value);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_HANDLER_DESC_FREE(handler, env);
+            AXIS2_QNAME_FREE(attr_qname, env);
+            return NULL;
+        }
+    }
+
+    /*processing phase Rules (order) */
+    axis2_om_node_t *order_node = NULL;
+    axis2_om_element_t *order_element = NULL;
+    axis2_qname_t *order_qname = NULL;
+    
+    order_qname = axis2_qname_create(env, AXIS2_ORDER, NULL, NULL);
+    order_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(handler_element,
+        env, order_qname, handler_node, &order_node);
+    if(NULL == (&order_element) || NULL == order_node)
+    {
+        AXIS2_HANDLER_DESC_FREE(handler, env);
+        AXIS2_QNAME_FREE(attr_qname, env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE, 
+            AXIS2_FAILURE);
+        return NULL;
+    }
+    else
+    {
+        axis2_hash_t *order_itr = NULL;
+        axis2_om_children_qname_iterator_t *params = NULL;
+        axis2_qname_t *param_qname = NULL;
+        axis2_hash_index_t *index_i = NULL;
+        
+        order_itr = AXIS2_OM_ELEMENT_GET_ALL_ATTRIBUTES(order_element, env);
+        if(!order_itr)
+        {
+            AXIS2_HANDLER_DESC_FREE(handler, env);
+            AXIS2_QNAME_FREE(attr_qname, env);
+            return NULL;
+        }
+        
+        index_i = axis2_hash_first (order_itr, env);
+    
+        while(NULL != index_i)
+        {
+            axis2_om_attribute_t *order_attrib = NULL;
+            axis2_qname_t *qname = NULL;
+            axis2_char_t *name = NULL;
+            axis2_char_t *value = NULL;
+            void *v = NULL;
+
+            axis2_hash_this (index_i, NULL, NULL, &v);
+            order_attrib = (axis2_om_attribute_t *) v;
+            qname = AXIS2_OM_ATTRIBUTE_GET_QNAME(order_attrib, env);
+            name = AXIS2_QNAME_GET_LOCALPART(qname, env);
+            value = AXIS2_OM_ATTRIBUTE_GET_VALUE(order_attrib, env);
+            if(0 == AXIS2_STRCMP(AXIS2_AFTER, name))
+            {
+                struct axis2_phase_rule *phase_rule = NULL;
+                phase_rule = AXIS2_HANDLER_DESC_GET_RULES(handler, env);
+                status = AXIS2_PHASE_RULE_SET_AFTER(phase_rule, env, value);
+                if(AXIS2_FAILURE == status)
+                {
+                    AXIS2_HANDLER_DESC_FREE(handler, env);
+                    AXIS2_QNAME_FREE(attr_qname, env);
+                    return NULL;
+                }
+            }
+            if(0 == AXIS2_STRCMP(AXIS2_BEFORE, name))
+            {
+                struct axis2_phase_rule *phase_rule = NULL;
+                phase_rule = AXIS2_HANDLER_DESC_GET_RULES(handler, env);
+                status = AXIS2_PHASE_RULE_SET_BEFORE(phase_rule, env, value);
+                if(AXIS2_FAILURE == status)
+                {
+                    AXIS2_HANDLER_DESC_FREE(handler, env);
+                    AXIS2_QNAME_FREE(attr_qname, env);
+                    return NULL;
+                }
+            }
+            if(0 == AXIS2_STRCMP(AXIS2_PHASE, name))
+            {
+                struct axis2_phase_rule *phase_rule = NULL;
+                phase_rule = AXIS2_HANDLER_DESC_GET_RULES(handler, env);
+                status = AXIS2_PHASE_RULE_SET_NAME(phase_rule, env, value);
+                if(AXIS2_FAILURE == status)
+                {
+                    AXIS2_HANDLER_DESC_FREE(handler, env);
+                    AXIS2_QNAME_FREE(attr_qname, env);
+                    return NULL;
+                }
+            }
+            if(0 == AXIS2_STRCMP(AXIS2_PHASEFIRST, name))
+            {
+                axis2_char_t *bool_val = axis2_desc_builder_get_value(
+                    desc_builder, env, value);
+                
+                if(0 == AXIS2_STRCMP(bool_val, "true"))
+                {
+                    struct axis2_phase_rule *phase_rule = NULL;
+                    phase_rule = AXIS2_HANDLER_DESC_GET_RULES(handler, env);
+                    status = AXIS2_PHASE_RULE_SET_PHASE_FIRST(phase_rule, env,
+                        AXIS2_TRUE);
+                    if(AXIS2_FAILURE == status)
+                    {
+                        AXIS2_HANDLER_DESC_FREE(handler, env);
+                        AXIS2_QNAME_FREE(attr_qname, env);
+                        AXIS2_FREE((*env)->allocator, bool_val);
+                        return NULL;
+                    }
+                }
+                else if(0 == AXIS2_STRCMP(bool_val, "false"))
+                {
+                    struct axis2_phase_rule *phase_rule = NULL;
+                    phase_rule = AXIS2_HANDLER_DESC_GET_RULES(handler, env);
+                    status = AXIS2_PHASE_RULE_SET_PHASE_FIRST(phase_rule, env,
+                        AXIS2_FALSE);
+                    if(AXIS2_FAILURE == status)
+                    {
+                        AXIS2_HANDLER_DESC_FREE(handler, env);
+                        AXIS2_QNAME_FREE(attr_qname, env);
+                        AXIS2_FREE((*env)->allocator, bool_val);
+                        return NULL;
+                    }
+                }
+                AXIS2_FREE((*env)->allocator, bool_val);
+            }
+            index_i = axis2_hash_next (env, index_i);
+        }
+        
+        param_qname = axis2_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
+        params = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(handler_element,
+            env, param_qname, handler_node);
+        status = axis2_desc_builder_process_params(desc_builder, env, params, 
+            handler->param_container, parent);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_HANDLER_DESC_FREE(handler, env);
+            AXIS2_QNAME_FREE(attr_qname, env);
+            AXIS2_QNAME_FREE(param_qname, env);
+            return NULL;   
+        }      
+    }
+    
+    status = AXIS2_HANDLER_DESC_SET_PARENT(handler, env, parent);
+    if(AXIS2_FAILURE == status)
+    {
+        AXIS2_HANDLER_DESC_FREE(handler, env);
+        AXIS2_QNAME_FREE(attr_qname, env);
+        return NULL; 
+    }
+    
+    return handler;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_params(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                axis2_om_children_qname_iterator_t *params,
+                                axis2_param_container_t *param_container,
+                                axis2_param_container_t *parent )
+{
+    axis2_status_t status = AXIS2_FAILURE;
+        
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, params, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, param_container, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, parent, AXIS2_FAILURE);
+    
+    while(AXIS2_FALSE != AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(params, env))
+    {
+        axis2_om_element_t *param_element = NULL;
+        axis2_om_node_t *param_node = NULL;
+        axis2_om_element_t *para_value = NULL;
+        axis2_om_node_t *para_node = NULL;
+        axis2_param_t *param = NULL;
+        axis2_param_t *parent_para = NULL;
+        axis2_om_attribute_t *para_name = NULL;
+        axis2_om_attribute_t *para_locked = NULL;  
+        axis2_qname_t *att_locked = NULL;
+        axis2_qname_t *att_qname = NULL;        
+        
+        /* this is to check whether some one has locked the parmter at the top 
+         * level
+         */
+        param_node = (axis2_om_node_t *)
+            AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(params, env);
+        param = axis2_param_create(env, NULL, NULL);
+        /* setting param_element */
+        status = AXIS2_PARAM_SET_ELEMENT(param, env, param_node);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_PARAM_FREE(param, env);
+            return status;
+        }
+        /* setting paramter Name */
+        att_qname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
+        para_name = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(param_element, env, 
+            att_qname);
+        AXIS2_QNAME_FREE(att_qname, env);
+        if(!para_name)
+        {
+            AXIS2_PARAM_FREE(param, env);
+            return AXIS2_FAILURE;
+        }
+        status = AXIS2_PARAM_SET_NAME(param, env, AXIS2_OM_ATTRIBUTE_GET_VALUE(
+            para_name, env));
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_PARAM_FREE(param, env);
+            return AXIS2_FAILURE;
+        }
+        /* setting paramter Value (the chiled elemnt of the paramter) */
+        para_value = AXIS2_OM_ELEMENT_GET_FIRST_ELEMENT(param_element, env,
+            param_node, &para_node);
+        if(NULL != para_value)
+        {
+            status = AXIS2_PARAM_SET_VALUE(param, env, param_element);
+            if(AXIS2_FAILURE == status)
+            {
+                AXIS2_PARAM_FREE(param, env);
+                return AXIS2_FAILURE;
+            }
+            AXIS2_PARAM_SET_PARAM_TYPE(param, env, AXIS2_DOM_PARAM);
+        }
+        else
+        {
+            axis2_char_t *para_test_value = AXIS2_OM_ELEMENT_GET_TEXT(
+                param_element, env, param_node);
+            status = AXIS2_PARAM_SET_VALUE(param, env, para_test_value);
+            if(AXIS2_FAILURE == status)
+            {
+                AXIS2_PARAM_FREE(param, env);
+                return AXIS2_FAILURE;
+            }
+            AXIS2_PARAM_SET_PARAM_TYPE(param, env, AXIS2_TEXT_PARAM);
+        }
+        /* setting locking attrib */
+        att_locked = axis2_qname_create(env, AXIS2_ATTLOCKED, NULL, NULL);
+        para_locked = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(param_element, env, 
+            att_locked);
+        if(NULL != parent)
+        {
+            parent_para = AXIS2_PARAM_CONTAINER_GET_PARAM(parent, env, 
+                AXIS2_PARAM_GET_NAME(param, env));
+            
+        }
+        if(NULL != para_locked)
+        {
+            axis2_char_t *locked_value = NULL;
+            
+            locked_value = AXIS2_OM_ATTRIBUTE_GET_VALUE(para_locked, env);
+            if(0 == AXIS2_STRCMP("true", locked_value))
+            {
+                /*if the parameter is locked at some levle paramer value replace
+                 * by that   
+                 */
+                if(NULL != parent && AXIS2_TRUE == 
+                        AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED(parent, env, 
+                            AXIS2_PARAM_GET_NAME(param, env)))
+                {
+                    AXIS2_PARAM_FREE(param, env);
+                    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_CONF_NOT_FOUND,
+                        AXIS2_FAILURE);
+                    return AXIS2_FAILURE;
+                }
+                else
+                {
+                    AXIS2_PARAM_SET_LOCKED(param, env, AXIS2_TRUE);
+                }
+            }
+            else
+            {
+                AXIS2_PARAM_SET_LOCKED(param, env, AXIS2_FALSE);
+            }
+        }
+        if(NULL != parent)
+        {
+            if(NULL != parent_para || AXIS2_FALSE == 
+                    AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED(parent, env, 
+                        AXIS2_PARAM_GET_NAME(param, env)))
+            {
+                status = AXIS2_PARAM_CONTAINER_ADD_PARAM(param_container, env, 
+                    param);
+            }
+        }
+        else
+        {
+            status = AXIS2_PARAM_CONTAINER_ADD_PARAM(param_container, env, 
+                param);   
+        }   
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_op_module_refs(axis2_desc_builder_t *desc_builder,
+                          axis2_env_t **env,
+                          struct axis2_om_children_qname_iterator *module_refs, 
+                          struct axis2_op *op)
+{
+    axis2_desc_builder_impl_t *desc_builder_impl = NULL;
+    struct axis2_om_element *moduleref = NULL;
+    struct axis2_om_attribute *module_ref_attrib = NULL;
+    axis2_qname_t *ref = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+        
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_refs, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op, AXIS2_FAILURE);
+    
+    desc_builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
+    
+    while(AXIS2_TRUE == AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(module_refs,
+        env))
+    {
+        moduleref = (struct axis2_om_element *)
+            AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(module_refs, env);
+        ref = axis2_qname_create(env, AXIS2_REF, NULL, NULL);
+        module_ref_attrib = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(moduleref, env, ref);
+        if(NULL != module_ref_attrib)
+        {
+            axis2_char_t *ref_name = NULL;
+            axis2_qname_t *ref_qname = NULL;
+            
+            ref_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(module_ref_attrib, env);
+            ref_qname = axis2_qname_create(env, ref_name, NULL, NULL);
+            if( NULL == AXIS2_DEP_ENGINE_GET_MODULE(desc_builder_impl->engine, env,
+                ref_qname))
+            {
+                AXIS2_QNAME_FREE(ref_qname, env);
+                AXIS2_QNAME_FREE(ref, env);
+                AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_NOT_FOUND, 
+                    AXIS2_FAILURE);
+                return AXIS2_FAILURE;
+            }
+            else
+            {
+                status = AXIS2_OP_ADD_MODULE(op, env, ref_qname);
+                if(AXIS2_FAILURE == status)
+                {
+                    AXIS2_QNAME_FREE(ref_qname, env);
+                    AXIS2_QNAME_FREE(ref, env);
+                    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_NOT_FOUND, 
+                        AXIS2_FAILURE);
+                    return AXIS2_FAILURE;
+                }
+            }  
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_msg_recv *AXIS2_CALL
+axis2_desc_builder_load_msg_recv(axis2_desc_builder_t *desc_builder,
+                                    axis2_env_t **env,
+                                    struct axis2_om_element *recv_element)
+{
+    struct axis2_om_attribute *recv_name = NULL;
+    axis2_char_t *class_name = NULL;
+    axis2_msg_recv_t *msg_recv = NULL;
+    axis2_qname_t *class_qname = NULL;
+    axis2_param_t *impl_info_param = NULL;
+    struct axis2_dll_desc *dll_desc = NULL;
+     
+    class_qname = axis2_qname_create(env, AXIS2_CLASSNAME, NULL, NULL);
+    recv_name = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(recv_element, env, class_qname);
+    class_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(recv_name, env);
+    dll_desc = axis2_dll_desc_create(env);
+    AXIS2_DLL_DESC_SET_NAME(dll_desc, env, class_name);
+    AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_MSG_RECV_DLL);
+    axis2_class_loader_init(env);
+    impl_info_param = axis2_param_create(env, NULL, NULL);
+    
+    AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc); 
+    msg_recv = (axis2_msg_recv_t *) axis2_class_loader_create_dll(env, 
+        impl_info_param);
+    
+    return msg_recv;
+}
+
+struct axis2_msg_recv *AXIS2_CALL
+axis2_desc_builder_load_default_msg_recv(axis2_desc_builder_t *desc_builder,
+                                            axis2_env_t **env)
+{
+    axis2_char_t *default_msg_recv = "axis2_raw_xml_in_out_msg_recv";
+    axis2_msg_recv_t *msg_recv = NULL;
+    axis2_param_t *impl_info_param = NULL;
+    struct axis2_dll_desc *dll_desc = NULL;
+    
+    /**
+     * Setting default Message Recive as Message Receiver
+     */
+    dll_desc = axis2_dll_desc_create(env);
+    AXIS2_DLL_DESC_SET_NAME(dll_desc, env, default_msg_recv);
+    AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_MSG_RECV_DLL);
+    axis2_class_loader_init(env);
+    impl_info_param = axis2_param_create(env, NULL, NULL);
+    
+    AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc); 
+    msg_recv = (axis2_msg_recv_t *) axis2_class_loader_create_dll(env, 
+        impl_info_param);
+    
+    return msg_recv;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_desc_builder_get_short_file_name(axis2_desc_builder_t *desc_builder,
+                                        axis2_env_t **env,
+                                        axis2_char_t *file_name) 
+{
+    axis2_char_t *separator = NULL;
+    axis2_char_t *value = NULL;
+    axis2_char_t *file_name_l = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, file_name, NULL);
+    
+    file_name_l = AXIS2_STRDUP(file_name, env);
+    if(!file_name_l)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    while(NULL == value)
+    {
+        value = strpbrk(file_name_l, separator);
+    }
+    value[0] = AXIS2_EOLN;
+    value = file_name_l;
+    
+    return value;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_desc_builder_get_value(axis2_desc_builder_t *desc_builder,
+                                axis2_env_t **env,
+                                axis2_char_t *in) 
+{
+    axis2_char_t *separator = ":";
+    axis2_char_t *value = NULL;
+    axis2_char_t *in_l = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, in, NULL);
+    
+    in_l = AXIS2_STRDUP(in, env);
+    if(!in_l)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    value = strpbrk(in_l, separator);
+    value = value + 1;
+    
+    return value;
+}

Added: webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/phases_info.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/phases_info.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/phases_info.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,517 @@
+#include <axis2_phases_info.h>
+
+/** 
+ * @brief Phases Info struct impl
+ *	Axis2 Phases Info impl  
+ */
+typedef struct axis2_phases_info_impl
+{
+	axis2_phases_info_t phases_info;
+    axis2_array_list_t *in_phases;
+    axis2_array_list_t *out_phases;
+    axis2_array_list_t *in_faultphases;
+    axis2_array_list_t *out_faultphases;
+    
+} axis2_phases_info_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(phases_info) \
+        ((axis2_phases_info_impl_t *)(phases_info))
+
+/***************************** Function headers *******************************/
+
+axis2_status_t AXIS2_CALL
+axis2_phases_info_free (axis2_phases_info_t *phases_info,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_in_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *in_phases);
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_out_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *out_phases);
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_in_faultphases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *in_faultphases);
+                                
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_out_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env,
+                                        axis2_array_list_t * out_faultphases);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_in_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_out_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_in_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_out_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_in_phases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_out_phases(axis2_phases_info_t *phases_info,
+                                            axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_in_faultphases(axis2_phases_info_t *phases_info,
+                                                axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_out_faultphases(axis2_phases_info_t *phases_info,
+                                                axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_op_phases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env,
+                                        struct axis2_op *axis2_opt);
+                                    
+/***************************** End of function headers ************************/
+
+axis2_phases_info_t * AXIS2_CALL 
+axis2_phases_info_create (axis2_env_t **env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    
+	axis2_phases_info_impl_t *phases_info_impl = 
+        (axis2_phases_info_impl_t *) AXIS2_MALLOC ((*env)->allocator, 
+        sizeof(axis2_phases_info_impl_t));
+    
+	if(NULL == phases_info_impl)
+	{
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+	}
+       
+    phases_info_impl->in_phases = NULL;
+    phases_info_impl->out_phases = NULL;
+    phases_info_impl->in_faultphases = NULL;
+    phases_info_impl->out_faultphases = NULL;
+	
+	phases_info_impl->phases_info.ops = (axis2_phases_info_ops_t *)
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_phases_info_ops_t));
+    
+	if(NULL == phases_info_impl->phases_info.ops)
+	{
+		AXIS2_FREE ((*env)->allocator, phases_info_impl);
+        phases_info_impl = NULL;
+		AXIS2_ERROR_SET ((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;        
+	}
+    
+	phases_info_impl->phases_info.ops->free = axis2_phases_info_free;
+    
+	phases_info_impl->phases_info.ops->set_in_phases =
+        axis2_phases_info_set_in_phases;
+    
+    phases_info_impl->phases_info.ops->set_out_phases =
+        axis2_phases_info_set_out_phases;
+    
+    phases_info_impl->phases_info.ops->set_in_faultphases =
+        axis2_phases_info_set_in_faultphases;
+    
+    phases_info_impl->phases_info.ops->set_out_faultphases =
+        axis2_phases_info_set_out_faultphases;
+    
+    phases_info_impl->phases_info.ops->get_in_phases = 
+            axis2_phases_info_get_in_phases;
+    
+    phases_info_impl->phases_info.ops->get_out_phases = 
+            axis2_phases_info_get_out_phases;
+	
+    phases_info_impl->phases_info.ops->get_in_faultphases = 
+            axis2_phases_info_get_in_faultphases;
+    
+    phases_info_impl->phases_info.ops->get_out_faultphases = 
+            axis2_phases_info_get_out_faultphases;
+
+    phases_info_impl->phases_info.ops->get_op_in_phases = 
+            axis2_phases_info_get_op_in_phases;
+                                        
+    phases_info_impl->phases_info.ops->get_op_out_phases = 
+            axis2_phases_info_get_op_out_phases;                                   
+                                        
+    phases_info_impl->phases_info.ops->get_op_in_faultphases = 
+            axis2_phases_info_get_op_in_faultphases;                                    
+    
+    phases_info_impl->phases_info.ops->get_op_out_faultphases = 
+            axis2_phases_info_get_op_out_faultphases;
+
+    phases_info_impl->phases_info.ops->set_op_phases = 
+            axis2_phases_info_set_op_phases;                                      
+    
+	return &(phases_info_impl->phases_info);
+}
+
+/******************************************************************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_free (axis2_phases_info_t *phases_info, 
+                            axis2_env_t **env)
+{
+    axis2_phases_info_impl_t *phases_info_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    
+	if(NULL != phases_info->ops)
+    {
+        AXIS2_FREE((*env)->allocator, phases_info->ops);
+        phases_info->ops = NULL;
+    }
+    
+    if(NULL != phases_info_impl)
+    {
+        AXIS2_FREE((*env)->allocator, phases_info_impl);
+        phases_info_impl = NULL;
+    }
+    
+	return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_in_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *in_phases) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, in_phases, AXIS2_FAILURE);
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    if(info_impl->in_phases)
+        AXIS2_ARRAY_LIST_FREE(info_impl->in_phases, env);
+    
+    info_impl->in_phases = in_phases;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_out_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *out_phases) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, out_phases, AXIS2_FAILURE);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    if(info_impl->out_phases)
+        AXIS2_ARRAY_LIST_FREE(info_impl->out_phases, env);
+    info_impl->out_phases = out_phases;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_in_faultphases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env,
+                                axis2_array_list_t *in_faultphases) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, in_faultphases, AXIS2_FAILURE);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    if(info_impl->in_faultphases)
+        AXIS2_ARRAY_LIST_FREE(info_impl->in_faultphases, env);
+    info_impl->in_faultphases = in_faultphases;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_out_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env,
+                                        axis2_array_list_t * out_faultphases) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, out_faultphases, AXIS2_FAILURE);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    if(info_impl->out_faultphases)
+        AXIS2_ARRAY_LIST_FREE(info_impl->out_faultphases, env);
+    
+    info_impl->out_faultphases = out_faultphases;
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_in_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(phases_info)->in_phases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_out_phases(axis2_phases_info_t *phases_info,
+                                axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(phases_info)->out_phases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_in_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(phases_info)->in_faultphases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_out_faultphases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(phases_info)->out_faultphases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_in_phases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    struct axis2_phase *phase = NULL;
+    int i = 0; 
+    axis2_char_t *phase_name = NULL;
+    axis2_array_list_t * op_in_phases = NULL; 
+    axis2_status_t status = AXIS2_FAILURE;    
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    op_in_phases = axis2_array_list_create(env, 0);
+    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+    
+    status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+    if(AXIS2_FAILURE == status)
+    {
+        AXIS2_PHASE_FREE(phase, env);
+        phase = NULL;
+        AXIS2_ARRAY_LIST_FREE(op_in_phases, env);
+        op_in_phases = NULL;
+        return NULL;
+    }
+    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->in_phases, env); i++) 
+    {
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->in_phases, env, i);
+        if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORTIN, phase_name) ||
+                0 == AXIS2_STRCMP(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
+                0 == AXIS2_STRCMP(AXIS2_PHASE_DISPATCH, phase_name) ||
+                0 == AXIS2_STRCMP(AXIS2_PHASE_POST_DISPATCH, phase_name)) 
+        {
+            /* Do nothing */
+        } else 
+        {
+            phase = axis2_phase_create(env, phase_name);
+            status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+            if(AXIS2_FAILURE == status)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+                AXIS2_ARRAY_LIST_FREE(op_in_phases, env);
+                op_in_phases = NULL;
+                return NULL;
+            }
+        }
+    }
+    return op_in_phases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_out_phases(axis2_phases_info_t *phases_info,
+                                            axis2_env_t **env) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    struct axis2_phase *phase = NULL;
+    int i = 0; 
+    axis2_char_t *phase_name = NULL;
+    axis2_array_list_t * op_out_phases = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    op_out_phases = axis2_array_list_create(env, 0);
+    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->out_phases, env); i++) 
+    {
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->out_phases, env, i);
+        if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORT_OUT, phase_name)) 
+        {
+            /* Do Nothing */
+        } else 
+        {
+            phase = axis2_phase_create(env, phase_name);
+            status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+            if(AXIS2_FAILURE == status)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+                AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
+                op_out_phases = NULL;
+                return NULL;
+            }
+        }
+    }
+    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    if(AXIS2_FAILURE == status)
+    {
+        AXIS2_PHASE_FREE(phase, env);
+        phase = NULL;
+        AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
+        op_out_phases = NULL;
+        return NULL;
+    }
+    phase = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
+    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    if(AXIS2_FAILURE == status)
+    {
+        AXIS2_PHASE_FREE(phase, env);
+        phase = NULL;
+        AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
+        op_out_phases = NULL;
+        return NULL;
+        
+    }
+    return op_out_phases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_in_faultphases(axis2_phases_info_t *phases_info,
+                                                axis2_env_t **env) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    int i = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *phase_name = NULL;
+    axis2_array_list_t * op_in_faultphases = NULL;
+    struct axis2_phase *phase = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    op_in_faultphases = axis2_array_list_create(env, 0);
+    
+    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->in_faultphases, env); i++) 
+    {
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->in_faultphases, env, i);
+        phase = axis2_phase_create(env, phase_name);
+        status = AXIS2_ARRAY_LIST_ADD(op_in_faultphases, env, phase);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_PHASE_FREE(phase, env);
+            phase = NULL;
+            AXIS2_ARRAY_LIST_FREE(op_in_faultphases, env);
+            op_in_faultphases = NULL;
+            return NULL;
+            
+        }
+    }
+    return op_in_faultphases;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_phases_info_get_op_out_faultphases(axis2_phases_info_t *phases_info,
+                                                axis2_env_t **env) 
+{
+    axis2_phases_info_impl_t *info_impl = NULL;
+    int i = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *phase_name = NULL;
+    axis2_array_list_t * op_out_faultphases = NULL;
+    struct axis2_phase *phase = NULL;
+        
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, NULL);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    op_out_faultphases = axis2_array_list_create(env, 0);
+    
+    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(info_impl->out_faultphases, env); i++) 
+    {
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(info_impl->out_faultphases, env, i);
+        phase = axis2_phase_create(env, phase_name);
+        status = AXIS2_ARRAY_LIST_ADD(op_out_faultphases, env, phase);
+        if(AXIS2_FAILURE == status)
+        {
+            AXIS2_PHASE_FREE(phase, env);
+            phase = NULL;
+            AXIS2_ARRAY_LIST_FREE(op_out_faultphases, env);
+            op_out_faultphases = NULL;
+            return NULL;
+            
+        }
+    }
+    return op_out_faultphases;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_phases_info_set_op_phases(axis2_phases_info_t *phases_info,
+                                        axis2_env_t **env,
+                                        struct axis2_op *axis2_opt) 
+{
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_array_list_t *op_in_phases = NULL;
+    axis2_array_list_t *op_out_phases = NULL;
+    axis2_array_list_t *op_in_faultphases = NULL;
+    axis2_array_list_t *op_out_faultphases = NULL;
+    
+    axis2_phases_info_impl_t *info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(phases_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, axis2_opt, AXIS2_FAILURE);
+    
+    info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+    
+    op_in_phases = axis2_phases_info_get_op_in_phases(phases_info, env);
+    if(NULL == op_in_phases)
+        return AXIS2_FAILURE;
+    
+    op_out_phases = axis2_phases_info_get_op_out_phases(phases_info, env);
+    if(NULL == op_out_phases)
+        return AXIS2_FAILURE;
+    
+    op_in_faultphases = axis2_phases_info_get_op_in_faultphases(phases_info, env);
+    if(NULL == op_in_faultphases)
+        return AXIS2_FAILURE;
+    
+    op_out_faultphases = axis2_phases_info_get_op_out_faultphases(phases_info, env);
+    if(NULL == op_out_faultphases)
+        return AXIS2_FAILURE;
+    
+    status = AXIS2_OP_SET_REMAINING_PHASES_INFLOW(axis2_opt, env, op_in_phases);
+    if(AXIS2_FAILURE == status)
+        return status;
+    status = AXIS2_OP_SET_PHASES_OUTFLOW(axis2_opt, env, op_out_phases);
+    if(AXIS2_FAILURE == status)
+        return status;
+    status = AXIS2_OP_SET_PHASES_IN_FAULT_FLOW(axis2_opt, env, op_in_faultphases);
+    if(AXIS2_FAILURE == status)
+        return status;
+    status = AXIS2_OP_SET_PHASES_OUT_FAULT_FLOW(axis2_opt, env, op_out_faultphases);
+    
+    return status;
+    
+}

Added: webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c?rev=359728&view=auto
==============================================================================
    (empty)

Added: webservices/axis2/trunk/c/modules/core/deployment/ws_info.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/ws_info.c?rev=359728&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/ws_info.c (added)
+++ webservices/axis2/trunk/c/modules/core/deployment/ws_info.c Wed Dec 28 22:04:05 2005
@@ -0,0 +1,211 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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_ws_info.h>
+#include <string.h>
+
+/** 
+ * @brief
+ */
+typedef struct axis2_ws_info_impl
+{
+	axis2_ws_info_t ws_info;
+    
+    axis2_char_t *file_name;
+    long last_modified_date;
+    /**
+     * To check whether the file is a module or a servise
+     */
+    int type;
+    
+    	
+} axis2_ws_info_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(ws_info) \
+    ((axis2_ws_info_impl_t *) ws_info)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_ws_info_free (axis2_ws_info_t *ws_info, 
+                            axis2_env_t **env);
+
+
+
+                                
+/************************** End of function prototypes ************************/
+
+axis2_ws_info_t * AXIS2_CALL 
+axis2_ws_info_create_with_file_name_and_last_modified_date (axis2_env_t **env,
+                                        axis2_char_t *file_name,
+                                        long last_modified_date)
+{
+    axis2_ws_info_impl_t *ws_info_impl = NULL;
+    
+	AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, file_name, NULL);
+	
+	ws_info_impl = (axis2_ws_info_impl_t *) AXIS2_MALLOC((*env)->
+        allocator, sizeof(axis2_ws_info_impl_t));
+	
+	
+	if(NULL == ws_info_impl)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    
+    ws_info_impl->file_name = NULL;
+    ws_info_impl->last_modified_date = 0;
+    ws_info_impl->type = 0;
+    ws_info_impl->ws_info.ops = NULL;
+    
+    ws_info_impl->file_name = AXIS2_STRDUP(file_name, env);
+    if(!ws_info_impl->file_name)
+    {
+        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;   
+    }
+    
+    ws_info_impl->last_modified_date = last_modified_date;
+    
+	ws_info_impl->ws_info.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_ws_info_ops_t));
+	if(NULL == ws_info_impl->ws_info.ops)
+    {
+        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+	ws_info_impl->ws_info.ops->free =  axis2_ws_info_free;
+	
+	return &(ws_info_impl->ws_info);
+}
+
+axis2_ws_info_t * AXIS2_CALL 
+axis2_ws_info_create_with_file_name_and_last_modified_date_and_type (
+                                        axis2_env_t **env,
+                                        axis2_char_t *file_name,
+                                        long last_modified_date,
+                                        int type)
+{
+    axis2_ws_info_impl_t *ws_info_impl = NULL;
+   
+	AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, file_name, NULL);
+    
+    ws_info_impl = (axis2_ws_info_impl_t *)
+        axis2_ws_info_create_with_file_name_and_last_modified_date(env,
+            file_name, last_modified_date);
+    if(!ws_info_impl)
+    {
+        axis2_ws_info_free(&(ws_info_impl->ws_info), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;  
+    }
+    ws_info_impl->type = type;
+    return &(ws_info_impl->ws_info);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_ws_info_free (axis2_ws_info_t *ws_info, 
+                            axis2_env_t **env)
+{
+    axis2_ws_info_impl_t *ws_info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, AXIS2_FAILURE);
+    
+    ws_info_impl = AXIS2_INTF_TO_IMPL(ws_info);
+    
+	if(NULL != ws_info->ops)
+    {
+        AXIS2_FREE((*env)->allocator, ws_info->ops);
+        ws_info->ops = NULL;
+    }
+    
+    if(NULL != ws_info_impl->file_name)
+    {
+        AXIS2_FREE((*env)->allocator, ws_info_impl->file_name);
+        ws_info_impl->file_name = NULL;
+    }
+    
+    if(ws_info_impl)
+    {
+        AXIS2_FREE((*env)->allocator, ws_info_impl);
+        ws_info_impl = NULL;
+    }
+    
+	return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_ws_info_get_file_name(axis2_ws_info_t *ws_info,
+                                axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, NULL);
+    return AXIS2_INTF_TO_IMPL(ws_info)->file_name;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_ws_info_set_file_name(axis2_ws_info_t *ws_info,
+                                axis2_env_t **env,
+                                axis2_char_t *file_name) 
+{
+    axis2_ws_info_impl_t *ws_info_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, file_name, AXIS2_FAILURE);
+    
+    ws_info_impl = AXIS2_INTF_TO_IMPL(ws_info);
+    if(ws_info_impl->file_name)
+    {
+        AXIS2_FREE((*env)->allocator, ws_info_impl->file_name);
+        ws_info_impl->file_name = NULL;
+    }
+    ws_info_impl->file_name = file_name;
+    return AXIS2_SUCCESS;
+}
+
+long AXIS2_CALL
+axis2_ws_info_get_last_modified_date(axis2_ws_info_t *ws_info,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, AXIS2_FAILURE);
+    
+    return AXIS2_INTF_TO_IMPL(ws_info)->last_modified_date;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_ws_info_set_last_modified_date(axis2_ws_info_t *ws_info,
+                                        axis2_env_t **env,
+                                        long last_modified_date) 
+{
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(ws_info)->last_modified_date = last_modified_date;
+    return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+axis2_ws_info_get_type(axis2_ws_info_t *ws_info,
+                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(ws_info, env, AXIS2_FAILURE);
+    return AXIS2_INTF_TO_IMPL(ws_info)->type;
+}



Mime
View raw message