You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by da...@apache.org on 2009/03/04 02:53:02 UTC

svn commit: r749877 [1/5] - in /webservices/savan/trunk/c/src/storage: ./ common/ inmemory/ registry/ registry/test/ service/ sqlite/

Author: damitha
Date: Wed Mar  4 01:53:01 2009
New Revision: 749877

URL: http://svn.apache.org/viewvc?rev=749877&view=rev
Log:
Adding storage abstraction layer

Added:
    webservices/savan/trunk/c/src/storage/
    webservices/savan/trunk/c/src/storage/Makefile.am
    webservices/savan/trunk/c/src/storage/common/
    webservices/savan/trunk/c/src/storage/common/Makefile.am
    webservices/savan/trunk/c/src/storage/common/storage_mgr.c
    webservices/savan/trunk/c/src/storage/inmemory/
    webservices/savan/trunk/c/src/storage/inmemory/Makefile.am
    webservices/savan/trunk/c/src/storage/registry/
    webservices/savan/trunk/c/src/storage/registry/Makefile.am
    webservices/savan/trunk/c/src/storage/registry/storage_mgr.c
    webservices/savan/trunk/c/src/storage/registry/test/
    webservices/savan/trunk/c/src/storage/registry/test.c
    webservices/savan/trunk/c/src/storage/registry/test/Makefile.am
    webservices/savan/trunk/c/src/storage/registry/test/c.sh
    webservices/savan/trunk/c/src/storage/registry/test/main.c
    webservices/savan/trunk/c/src/storage/registry/test/synapse.sh
    webservices/savan/trunk/c/src/storage/registry/test/test_registry.c
    webservices/savan/trunk/c/src/storage/registry/test/xml.c
    webservices/savan/trunk/c/src/storage/service/
    webservices/savan/trunk/c/src/storage/service/Makefile
    webservices/savan/trunk/c/src/storage/service/Makefile.am
    webservices/savan/trunk/c/src/storage/service/service_storage_mgr.c
    webservices/savan/trunk/c/src/storage/sqlite/
    webservices/savan/trunk/c/src/storage/sqlite/Makefile.am
    webservices/savan/trunk/c/src/storage/sqlite/sqlite3.c
    webservices/savan/trunk/c/src/storage/sqlite/sqlite3.h
    webservices/savan/trunk/c/src/storage/sqlite/storage_mgr.c

Added: webservices/savan/trunk/c/src/storage/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1 @@
+SUBDIRS = common @SAVAN_STORAGE@

Added: webservices/savan/trunk/c/src/storage/common/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/common/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/common/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/common/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1,10 @@
+noinst_LTLIBRARIES = libsavan_common_storage.la
+
+libsavan_common_storage_la_SOURCES = \
+								storage_mgr.c
+
+INCLUDES = -I$(top_builddir)/include \
+		   	@AXIS2INC@ \
+		   	@AXIOMINC@ \
+		   	@NEETHIINC@ \
+		   	@UTILINC@

Added: webservices/savan/trunk/c/src/storage/common/storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/common/storage_mgr.c?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/common/storage_mgr.c (added)
+++ webservices/savan/trunk/c/src/storage/common/storage_mgr.c Wed Mar  4 01:53:01 2009
@@ -0,0 +1,89 @@
+/*
+ * 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 <savan_storage_mgr.h>
+#include <savan_constants.h>
+#include <savan_error.h>
+#include <savan_util.h>
+#include <axutil_log.h>
+#include <axutil_hash.h>
+#include <axutil_property.h>
+#include <axutil_uuid_gen.h>
+#include <axis2_conf_ctx.h>
+
+AXIS2_EXTERN void AXIS2_CALL
+savan_storage_mgr_free(
+    savan_storage_mgr_t *storage_mgr,
+    const axutil_env_t *env)
+{
+     return storage_mgr->ops->free(storage_mgr, env);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_storage_mgr_insert_subscriber(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber)
+{
+    return storage_mgr->ops->insert_subscriber(storage_mgr, env, subscriber);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_storage_mgr_update_subscriber(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber)
+{
+    return storage_mgr->ops->update_subscriber(storage_mgr, env, subscriber);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_storage_mgr_remove_subscriber(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id)
+{
+    return storage_mgr->ops->remove_subscriber(storage_mgr, env, subscriber_id);
+}
+
+AXIS2_EXTERN savan_subscriber_t *AXIS2_CALL
+savan_storage_mgr_retrieve_subscriber(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id)
+{
+    return storage_mgr->ops->retrieve_subscriber(storage_mgr, env, subscriber_id);
+}
+
+AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
+savan_storage_mgr_retrieve_all_subscribers(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    const axis2_char_t *filter)
+{
+    return storage_mgr->ops->retrieve_all_subscribers(storage_mgr, env, filter);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_storage_mgr_insert_topic(
+    savan_storage_mgr_t *storage_mgr, 
+    const axutil_env_t *env,
+    const axis2_char_t *topic_name,
+    const axis2_char_t *topic_url)
+{
+    return storage_mgr->ops->insert_topic(storage_mgr, env, topic_name, topic_url);
+}
+

Added: webservices/savan/trunk/c/src/storage/inmemory/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/inmemory/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/inmemory/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/inmemory/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1,13 @@
+noinst_LTLIBRARIES = libsavan_storage.la
+
+libsavan_storage_la_SOURCES =
+
+INCLUDES = -I$(top_builddir)/include \
+			-I$(top_builddir)/include/savan \
+			-I. \
+			@AXIS2INC@ \
+		   	@AXIOMINC@ \
+		   	@NEETHIINC@ \
+		   	@UTILINC@
+
+EXTRA_DIST=

Added: webservices/savan/trunk/c/src/storage/registry/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/registry/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = libsavan_storage.la
+
+libsavan_storage_la_SOURCES = storage_mgr.c
+libsavan_storage_la_LIBADD = ../common/libsavan_common_storage.la \
+							 -lregistry_client
+
+INCLUDES = -I$(top_builddir)/include \
+			-I$(top_builddir)/include/savan \
+			-I. \
+			@AXIS2INC@ \
+		   	@AXIOMINC@ \
+		   	@NEETHIINC@ \
+			@REGISTRYINC@ \
+		   	@UTILINC@
+
+EXTRA_DIST=

Added: webservices/savan/trunk/c/src/storage/registry/storage_mgr.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/storage_mgr.c?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/storage_mgr.c (added)
+++ webservices/savan/trunk/c/src/storage/registry/storage_mgr.c Wed Mar  4 01:53:01 2009
@@ -0,0 +1,854 @@
+/*
+ * 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 <savan_storage_mgr.h>
+#include <axutil_log.h>
+#include <axutil_hash.h>
+#include <axutil_property.h>
+#include <axutil_types.h>
+#include <axutil_file_handler.h>
+#include <platforms/axutil_platform_auto_sense.h>
+#include <savan_constants.h>
+#include <savan_util.h>
+#include <savan_error.h>
+#include <remote_registry.h>
+#include <remote_registry_resource.h>
+
+#define SYNAPSE_NAMESPACE "http://ws.apache.org/ns/synapse"
+#define SYNAPSE_NS_PREFIX "syn"
+#define ELEM_NAME_SUBSCRIPTION "subscription"
+#define ELEM_NAME_ENDPOINT "endpoint"
+#define ELEM_NAME_ADDRESS "address"
+#define ATTR_NAME_URL "url"
+#define EPR_TYPE "application/vnd.epr"
+#define TOPIC_INDEX_PARENT_PATH "/eventing/index"
+#define SUBSCRIPTION_COLLECTION_NAME "system.subscriptions"
+#define TOPIC_INDEX "/eventing/index/TopicIndex"
+
+/**
+ * Savan registry based storage manager dependes on the WSO2 registry for subscription storation.
+ * This use WSF/C registry cache client to communicate with the WSO2 registry. Registry cache
+ * client reduce the overhead of each time fetching records from the registry which is very 
+ * expensive by caching the records locally.
+ */
+/** 
+ * @brief Savan Registry Storage Manager Struct Impl
+ *   Savan Registry Storage Manager 
+ */
+typedef struct savan_registry_storage_mgr
+{
+    savan_storage_mgr_t storagemgr;
+    axis2_char_t *reg_url;
+    axis2_char_t *username;
+    axis2_char_t *password;
+    axis2_conf_t *conf;
+    remote_registry_t *remote_registry;
+} savan_registry_storage_mgr_t;
+
+typedef AXIS2_DECLARE_DATA struct savan_registry_storage_mgr_args
+{
+    const axutil_env_t *env;
+    void *data;
+} savan_registry_storage_mgr_args_t;
+
+#define SAVAN_INTF_TO_IMPL(storagemgr) ((savan_registry_storage_mgr_t *) storagemgr)
+
+static savan_subscriber_t *savan_registry_storage_mgr_extract_subscriber(
+        const axutil_env_t *env,
+        remote_registry_resource_t *resource);
+
+static axis2_char_t *savan_registry_storage_mgr_serialize_endpoint(
+        const axutil_env_t *env,
+        const savan_subscriber_t *subscriber);
+
+static axis2_status_t
+savan_registry_storage_mgr_init_resource(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env);
+
+AXIS2_EXTERN void AXIS2_CALL
+savan_registry_storage_mgr_free(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_insert_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_update_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_remove_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id);
+
+AXIS2_EXTERN savan_subscriber_t *AXIS2_CALL
+savan_registry_storage_mgr_retrieve_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id);
+
+AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
+savan_registry_storage_mgr_retrieve_all_subscribers(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *filter);
+
+static const savan_storage_mgr_ops_t storage_mgr_ops = 
+{
+    savan_registry_storage_mgr_free,
+    savan_registry_storage_mgr_insert_subscriber,
+    savan_registry_storage_mgr_update_subscriber,
+    savan_registry_storage_mgr_remove_subscriber,
+    savan_registry_storage_mgr_retrieve_subscriber,
+    savan_registry_storage_mgr_retrieve_all_subscribers,
+    NULL
+};
+
+AXIS2_EXTERN savan_storage_mgr_t * AXIS2_CALL
+savan_storage_mgr_create(
+    const axutil_env_t *env,
+    axis2_conf_t *conf)
+{
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    storagemgrimpl = AXIS2_MALLOC(env->allocator, sizeof(savan_registry_storage_mgr_t));
+    if (!storagemgrimpl)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_STORAGE_MANAGER_CREATION_FAILED, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    memset ((void *) storagemgrimpl, 0, sizeof(savan_registry_storage_mgr_t));
+
+    storagemgrimpl->remote_registry = NULL;
+    storagemgrimpl->reg_url = axutil_strdup(env, savan_util_get_resource_connection_string(env, conf));
+    storagemgrimpl->username = axutil_strdup(env, savan_util_get_resource_username(env, conf));
+    storagemgrimpl->password = axutil_strdup(env, savan_util_get_resource_password(env, conf));
+    storagemgrimpl->conf = conf;
+    storagemgrimpl->storagemgr.ops = &storage_mgr_ops;
+
+    status = savan_registry_storage_mgr_init_resource((savan_storage_mgr_t *) storagemgrimpl, env);
+    if(status != AXIS2_SUCCESS)
+    {
+        savan_registry_storage_mgr_free((savan_storage_mgr_t *) storagemgrimpl, env);
+        return NULL;
+    }
+    return (savan_storage_mgr_t *) storagemgrimpl;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+savan_registry_storage_mgr_free(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env)
+{
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[savan] Entry:savan_registry_storage_mgr_free");
+
+    if(storagemgrimpl->reg_url)
+    {
+        AXIS2_FREE(env->allocator, storagemgrimpl->reg_url);
+        storagemgrimpl->reg_url = NULL;
+    }
+    
+    if(storagemgrimpl->username)
+    {
+        AXIS2_FREE(env->allocator, storagemgrimpl->username);
+        storagemgrimpl->username = NULL;
+    }
+    
+    if(storagemgrimpl->password)
+    {
+        AXIS2_FREE(env->allocator, storagemgrimpl->password);
+        storagemgrimpl->password = NULL;
+    }
+
+    storagemgrimpl->conf = NULL;
+
+    if(storagemgrimpl)
+    {
+        AXIS2_FREE(env->allocator, storagemgrimpl);
+        storagemgrimpl = NULL;
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[savan] Exit:savan_registry_storage_mgr_free");
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_insert_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber)
+{
+    axis2_char_t *subscription_id = NULL;
+    axis2_char_t *expires = NULL;
+    axis2_char_t *filter = NULL;
+    axis2_char_t *id = NULL;
+    axis2_char_t *path = NULL; 
+    remote_registry_resource_t *res = NULL;
+    axutil_hash_t *properties = NULL;
+    char *content = NULL;
+    
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Entry:savan_registry_storage_mgr_insert_subscriber");
+	
+    subscription_id = savan_subscriber_get_id(subscriber, env);
+    filter = savan_subscriber_get_filter(subscriber, env);
+    path = axutil_strcat(env, AXIS2_PATH_SEP_STR, filter, AXIS2_PATH_SEP_STR, 
+            SUBSCRIPTION_COLLECTION_NAME, AXIS2_PATH_SEP_STR, subscription_id, NULL);
+    id = axutil_strcat(env, storagemgrimpl->reg_url, AXIS2_PATH_SEP_STR, filter, 
+            AXIS2_PATH_SEP_STR, SUBSCRIPTION_COLLECTION_NAME, AXIS2_PATH_SEP_STR, subscription_id, 
+            NULL);
+
+    res = remote_registry_resource_create(env);
+    content = savan_registry_storage_mgr_serialize_endpoint(env, subscriber);
+    remote_registry_resource_set_content(res, env, content);
+    remote_registry_resource_set_content_len(res, env, axutil_strlen(content));
+    remote_registry_resource_set_media_type(res, env, EPR_TYPE);
+    remote_registry_resource_set_description(res, env, "");
+
+    properties = axutil_hash_make(env);
+    if(properties)
+    {
+        axis2_char_t *endto = NULL;
+        axis2_endpoint_ref_t *endto_epr = NULL;
+        axis2_char_t *filter_dialect = NULL;
+
+
+        expires = savan_subscriber_get_expires(subscriber, env);
+        if(expires)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "expires"), AXIS2_HASH_KEY_STRING, 
+                    axutil_strdup(env, expires));
+        }
+        else
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "expires"), AXIS2_HASH_KEY_STRING, 
+                    axutil_strdup(env, "*"));
+        }
+
+        axutil_hash_set(properties, axutil_strdup(env, "staticFlag"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, "false"));
+        axutil_hash_set(properties, axutil_strdup(env, "filterValue"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, filter));
+
+        endto_epr = savan_subscriber_get_end_to(subscriber, env);
+        if(endto_epr)
+        {
+            endto = (axis2_char_t *) axis2_endpoint_ref_get_address(endto_epr, env);
+        }
+        if(endto)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "subManagerURI"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, endto));
+        }
+
+        filter_dialect = savan_subscriber_get_filter_dialect(subscriber, env);
+        if(filter_dialect)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "filterDialect"), AXIS2_HASH_KEY_STRING, 
+                    axutil_strdup(env, filter_dialect));
+        }
+
+        remote_registry_resource_set_properties(res, env, properties);
+    }
+
+    remote_registry_put(storagemgrimpl->remote_registry, env, path, res);
+    if(id)
+    {
+        AXIS2_FREE(env->allocator, id);
+    }
+    if(path)
+    {
+        AXIS2_FREE(env->allocator, path);
+        path = NULL;
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+        res = NULL;
+    }
+
+    res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_INSERT_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[savan] Could not retrive resource TopicIndex");
+        return AXIS2_FAILURE;
+    }
+    id = axutil_strcat(env, storagemgrimpl->reg_url, TOPIC_INDEX, NULL);
+    properties = remote_registry_resource_get_properties(res, env);
+    if(properties)
+    {
+        path = axutil_strcat(env, AXIS2_PATH_SEP_STR, filter, AXIS2_PATH_SEP_STR, 
+                SUBSCRIPTION_COLLECTION_NAME, NULL);
+        axutil_hash_set(properties, subscription_id, AXIS2_HASH_KEY_STRING, path);
+        remote_registry_resource_set_properties(res, env, properties);
+    }
+
+    remote_registry_resource_set_content(res, env, NULL);
+    remote_registry_resource_set_content_len(res, env, 0);
+    remote_registry_put(storagemgrimpl->remote_registry, env, TOPIC_INDEX, res);
+
+    if(id)
+    {
+        AXIS2_FREE(env->allocator, id);
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+        res = NULL;
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Exit:savan_registry_storage_mgr_insert_subscriber");
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_update_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    savan_subscriber_t *subscriber)
+{
+    axis2_char_t *expires = NULL;
+    axis2_char_t *filter = NULL;
+    axis2_char_t *subscriber_id = NULL;
+    axis2_char_t *path = NULL; 
+    remote_registry_resource_t *res = NULL;
+    remote_registry_resource_t *index_res = NULL;
+    axutil_hash_t *properties = NULL;
+    axis2_char_t *val = NULL;
+ 
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Entry:savan_registry_storage_mgr_update_subscriber");
+
+    index_res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!index_res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_INSERT_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[savan] Could not retrive resource TopicIndex");
+        return AXIS2_FAILURE;
+    }
+
+    subscriber_id = savan_subscriber_get_id(subscriber, env);
+    filter = savan_subscriber_get_filter(subscriber, env);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "filter:%s", filter);
+    val = remote_registry_resource_get_property(index_res, env, subscriber_id);
+    if(val)
+    {
+        path = axutil_strcat(env, val, AXIS2_PATH_SEP_STR, subscriber_id, NULL);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "path:%s", path);
+    }
+
+    res = remote_registry_get(storagemgrimpl->remote_registry, env, path, NULL);
+    if(!res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Could not retrive resource subscriber path:%s in registry", path);
+        return AXIS2_FAILURE;
+    }
+
+    remote_registry_resource_set_description(res, env, "");
+    properties = remote_registry_resource_get_properties(res, env);
+    if(properties)
+    {
+        axis2_char_t *endto = NULL;
+        axis2_endpoint_ref_t *endto_epr = NULL;
+        axis2_char_t *filter_dialect = NULL;
+
+        expires = savan_subscriber_get_expires(subscriber, env);
+        if(expires)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "expires"), AXIS2_HASH_KEY_STRING, 
+                    axutil_strdup(env, expires));
+        }
+
+        axutil_hash_set(properties, axutil_strdup(env, "staticFlag"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, "false"));
+        axutil_hash_set(properties, axutil_strdup(env, "filterValue"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, filter));
+
+        endto_epr = savan_subscriber_get_end_to(subscriber, env);
+        if(endto_epr)
+        {
+            endto = (axis2_char_t *) axis2_endpoint_ref_get_address(endto_epr, env);
+        }
+        if(endto)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "subManagerURI"), AXIS2_HASH_KEY_STRING, 
+                axutil_strdup(env, endto));
+        }
+
+        filter_dialect = savan_subscriber_get_filter_dialect(subscriber, env);
+        if(filter_dialect)
+        {
+            axutil_hash_set(properties, axutil_strdup(env, "filterDialect"), AXIS2_HASH_KEY_STRING, 
+                    axutil_strdup(env, filter_dialect));
+        }
+
+        remote_registry_resource_set_properties(res, env, properties);
+    }
+
+    remote_registry_put(storagemgrimpl->remote_registry, env, path, res);
+    
+    if(path)
+    {
+        AXIS2_FREE(env->allocator, path);
+        path = NULL;
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+        res = NULL;
+    }
+
+    savan_subscriber_set_renew_status(subscriber, env, AXIS2_TRUE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Exit:savan_registry_storage_mgr_update_subscriber");
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+savan_registry_storage_mgr_remove_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id)
+{
+    remote_registry_resource_t *res = NULL;
+    axis2_char_t *val;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *path = NULL;
+
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Entry:savan_registry_storage_mgr_remove_subscriber");
+
+    res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Could not retrive resource TopicIndex");
+        return AXIS2_FAILURE;
+    }
+
+    val = remote_registry_resource_get_property(res, env, subscriber_id);
+    if(val)
+    {
+        path = axutil_strcat(env, val, AXIS2_PATH_SEP_STR, subscriber_id, NULL);
+        status = remote_registry_delete(storagemgrimpl->remote_registry, env, path);
+    }
+    
+    remote_registry_resource_free(res, env);
+    if(AXIS2_SUCCESS != status)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_REMOVE_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Could not remove subscriber for id %s", subscriber_id);
+        return AXIS2_FAILURE;
+    }
+
+    res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Could not retrive resource TopicIndex");
+        return AXIS2_FAILURE;
+    }
+
+    remote_registry_resource_remove_property(res, env, subscriber_id);
+    remote_registry_put(storagemgrimpl->remote_registry, env, TOPIC_INDEX, res);
+    remote_registry_resource_free(res, env);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Exit:savan_registry_storage_mgr_remove_subscriber");
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN savan_subscriber_t *AXIS2_CALL
+savan_registry_storage_mgr_retrieve_subscriber(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *subscriber_id)
+{
+    remote_registry_resource_t *res = NULL;
+    remote_registry_resource_t *root_res = NULL;
+    axis2_char_t *val;
+    axis2_char_t *path = NULL;
+    savan_subscriber_t *subscriber = NULL;
+
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Entry:savan_registry_storage_mgr_retrieve_subscriber");
+
+    root_res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!root_res)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Could not retrive resource TopicIndex");
+        return AXIS2_FAILURE;
+    }
+
+    val = remote_registry_resource_get_property(root_res, env, subscriber_id);
+    if(val)
+    {
+        path = axutil_strcat(env, val, AXIS2_PATH_SEP_STR, subscriber_id, NULL);
+        res = remote_registry_get(storagemgrimpl->remote_registry, env, path, NULL);
+    }
+
+    if(res)
+    {
+        subscriber = savan_registry_storage_mgr_extract_subscriber(env, res);
+        if(subscriber)
+        {
+            savan_subscriber_set_id(subscriber, env, subscriber_id);
+        }
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Exit:savan_registry_storage_mgr_retrieve_subscriber");
+    return subscriber;
+}
+
+AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
+savan_registry_storage_mgr_retrieve_all_subscribers(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env,
+    const axis2_char_t *filter)
+{
+    remote_registry_resource_t *root_res = NULL;
+    axis2_char_t *path = NULL;
+    axutil_array_list_t *data_list = NULL;
+
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+ 
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Entry:savan_registry_storage_mgr_retrieve_all_subscribers");
+
+    /* Get subscribers for the filter from registry. Eg. /weather/4/system.subscriptions */
+    if(filter)
+    {
+        root_res = remote_registry_get(storagemgrimpl->remote_registry, env, 
+                (axis2_char_t *) filter, NULL);
+        if(root_res)
+        {
+            axutil_array_list_t *child_entries = NULL;
+            int i = 0;
+
+            child_entries = remote_registry_resource_get_entries(root_res, env);
+            if(child_entries)
+            {
+                data_list = axutil_array_list_create(env, 0);
+
+                /* load the child entries recursively */
+                for(i = 0; i < axutil_array_list_size(child_entries, env); i ++)
+                {
+                    remote_registry_resource_t *res = NULL;
+
+                    res = (remote_registry_resource_t*)axutil_array_list_get(child_entries, env, i);
+                    if(res)
+                    {
+                        savan_subscriber_t *subscriber = NULL;
+
+                        subscriber = savan_registry_storage_mgr_extract_subscriber(env, res);
+                        axutil_array_list_add(data_list, env, subscriber);
+                    }
+                }
+            }
+        }
+    }
+    else /* Get subscribers for the topic root from registry(/eventing/index/TopicIndex);*/
+    {
+        axutil_hash_t *properties = NULL;
+
+        root_res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+        if(!root_res)
+        {
+            AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_SUBSCRIBER_UPDATE_ERROR, AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "[savan] Could not retrive resource TopicIndex");
+            return AXIS2_FAILURE;
+        }
+        properties = remote_registry_resource_get_properties(root_res, env);
+        if(properties)
+        {
+            savan_subscriber_t *subscriber = NULL;
+            axutil_hash_index_t *hi;
+            void *val;
+            void *key;
+
+            data_list = axutil_array_list_create(env, 0);
+
+            for (hi = axutil_hash_first(properties, env); hi; hi = axutil_hash_next(env, hi)) 
+            {
+                remote_registry_resource_t *res = NULL;
+                axis2_char_t *subscriber_id = NULL;
+
+                axutil_hash_this(hi, (const void**)&key, NULL, &val);
+                subscriber_id = (axis2_char_t *) key;
+                path = axutil_strcat(env, val, AXIS2_PATH_SEP_STR, key, NULL);
+                res = remote_registry_get(storagemgrimpl->remote_registry, env, path, NULL);
+                if(res)
+                {
+                    if(res)
+                    {
+                        subscriber = savan_registry_storage_mgr_extract_subscriber(env, res);
+                        savan_subscriber_set_id(subscriber, env, subscriber_id);
+                        axutil_array_list_add(data_list, env, subscriber);
+                    }
+                }
+            }
+        }
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
+            "[savan] Exit:savan_registry_storage_mgr_retrieve_all_subscribers");
+    return data_list;
+}
+
+static axis2_status_t
+savan_registry_storage_mgr_init_resource(
+    savan_storage_mgr_t *storagemgr,
+    const axutil_env_t *env)
+{
+    remote_registry_resource_t *res = NULL;
+    axis2_char_t *id = NULL;
+    
+    savan_registry_storage_mgr_t *storagemgrimpl = NULL;
+    storagemgrimpl = SAVAN_INTF_TO_IMPL(storagemgr);
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[savan] Entry:savan_registry_storage_mgr_init_resource");
+
+    storagemgrimpl->remote_registry = remote_registry_create(env, storagemgrimpl->reg_url, 
+            storagemgrimpl->username, storagemgrimpl->password);
+    if(!storagemgrimpl->remote_registry)
+    {
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_DATABASE_CREATION_ERROR, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "[savan] Creating remote registry instance failed");
+        return AXIS2_FAILURE;
+    }
+
+    res = remote_registry_get(storagemgrimpl->remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        res = remote_registry_resource_create(env);
+        id = axutil_strcat(env, storagemgrimpl->reg_url, TOPIC_INDEX, NULL);
+        remote_registry_resource_set_properties(res, env, axutil_hash_make(env));
+        remote_registry_resource_set_description(res, env, "");
+        remote_registry_put(storagemgrimpl->remote_registry, env, TOPIC_INDEX, res);
+    }
+
+    if(id)
+    {
+        AXIS2_FREE(env->allocator, id);
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+    }
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[savan] Exit:savan_registry_storage_mgr_init_resource");
+
+    return AXIS2_SUCCESS;
+}
+
+static axis2_char_t *savan_registry_storage_mgr_serialize_endpoint(
+        const axutil_env_t *env,
+        const savan_subscriber_t *subscriber)
+{
+    axiom_namespace_t *ns = NULL;
+    axiom_node_t *subs_node = NULL;
+    axiom_element_t *subs_elem = NULL;
+    axiom_node_t *endpoint_node = NULL;
+    axiom_element_t *endpoint_elem = NULL;
+    axiom_node_t *addr_node = NULL;
+    axiom_element_t *addr_elem = NULL;
+    axiom_attribute_t *url_attr = NULL;
+    axis2_char_t *notifyto = NULL;
+    char *content = NULL;
+    
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[savan] Entry:savan_msg_recv_handle_sub_request");
+    
+    /* Format of the message is as 
+     * <subscription><syn:endpoint xmlns:syn="http://ws.apache.org/ns/synapse"><syn:address uri=
+     * "http://localhost:9000/services/SimpleStockQuoteService" /></syn:endpoint></subscription>
+     */
+    ns = axiom_namespace_create (env, SYNAPSE_NAMESPACE, SYNAPSE_NS_PREFIX);
+    if(subscriber)
+    {
+        axis2_endpoint_ref_t *notifyto_epr = NULL;
+
+        notifyto_epr = savan_subscriber_get_notify_to((savan_subscriber_t *) subscriber, env);
+        if(notifyto_epr)
+        {
+            notifyto = (axis2_char_t *) axis2_endpoint_ref_get_address(notifyto_epr, env);
+        }
+    }
+
+    subs_elem = axiom_element_create(env, NULL, ELEM_NAME_SUBSCRIPTION, NULL, &subs_node);
+    endpoint_elem = axiom_element_create(env, subs_node, ELEM_NAME_ENDPOINT, ns, &endpoint_node);
+    addr_elem = axiom_element_create(env, endpoint_node, ELEM_NAME_ADDRESS, ns, &addr_node);
+    url_attr = axiom_attribute_create(env, ATTR_NAME_URL, notifyto, NULL);
+    axiom_element_add_attribute(addr_elem, env, url_attr, addr_node);
+
+    content = (char *) axiom_node_to_string(subs_node, env);
+
+    return content; 
+}
+
+static savan_subscriber_t *savan_registry_storage_mgr_extract_subscriber(
+        const axutil_env_t *env,
+        remote_registry_resource_t *resource)
+{
+    savan_subscriber_t *subscriber = NULL;
+    axis2_char_t *content = NULL;
+    axutil_qname_t *qname = NULL;
+    axiom_node_t *subs_node = NULL;
+    axiom_element_t *subs_element = NULL;
+    axiom_node_t *endpoint_node = NULL;
+    axiom_element_t *endpoint_element = NULL;
+    axiom_node_t *address_node = NULL;
+    axiom_element_t *address_element = NULL;
+    axis2_char_t *address = NULL;
+    axutil_hash_t *properties = NULL;
+    axis2_char_t *static_flag = NULL;
+    axis2_char_t *subs_mgr_uri = NULL;
+    axis2_char_t *filter = NULL;
+    axis2_char_t *filter_dialect = NULL;
+    axis2_char_t *expires = NULL;
+    axis2_endpoint_ref_t *notifyto_epr = NULL;
+
+    content = remote_registry_resource_get_content(resource, env);
+    subs_node = axiom_node_create_from_buffer(env, content);
+    subs_element = axiom_node_get_data_element(subs_node, env);
+    if(!subs_element)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_OM_ELEMENT_EXPECTED, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    qname = axutil_qname_create(env, ELEM_NAME_ENDPOINT, SYNAPSE_NAMESPACE, NULL);
+    if(!qname)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    endpoint_element = axiom_element_get_first_child_with_qname(subs_element, env, qname, 
+            subs_node, &endpoint_node);
+
+    if(qname)
+    {
+        axutil_qname_free(qname, env);
+    }
+
+    qname = axutil_qname_create(env, ELEM_NAME_ADDRESS, SYNAPSE_NAMESPACE, NULL);
+    if(!qname)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    address_element = axiom_element_get_first_child_with_qname(endpoint_element, env, qname, 
+            endpoint_node, &address_node);
+
+    if(qname)
+    {
+        axutil_qname_free(qname, env);
+    }
+
+    address = axiom_element_get_attribute_value_by_name(address_element, env, ATTR_NAME_URL);
+    
+    if(!address)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_OM_ELEMENT_INVALID_STATE, AXIS2_FAILURE);
+        return NULL; 
+    }
+
+    notifyto_epr = axis2_endpoint_ref_create(env, address);
+    if(!notifyto_epr)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    subscriber = savan_subscriber_create(env);
+    if(!subscriber)
+    {
+        return NULL;
+    }
+
+    savan_subscriber_set_notify_to(subscriber, env, notifyto_epr);
+
+    properties = remote_registry_resource_get_properties(resource, env);
+    if(!properties)
+    {
+        savan_subscriber_free(subscriber, env);
+        AXIS2_HANDLE_ERROR(env, SAVAN_ERROR_PARSING_SUBSCRIBER_NODE_FAILED, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    expires = remote_registry_resource_get_property(resource, env, "expires");
+    if(expires)
+    {
+        savan_subscriber_set_expires(subscriber, env, expires);
+    }
+
+    static_flag = remote_registry_resource_get_property(resource, env, "staticFlag");
+    filter = remote_registry_resource_get_property(resource, env, "filterValue");
+    if(filter)
+    {
+        savan_subscriber_set_filter(subscriber, env, filter);
+    }
+
+    filter_dialect = remote_registry_resource_get_property(resource, env, "filterDialect");
+    if(filter_dialect)
+    {
+        savan_subscriber_set_filter_dialect(subscriber, env, filter_dialect);
+    }
+
+    subs_mgr_uri = remote_registry_resource_get_property(resource, env, "subManagerURI");
+
+    return subscriber;
+}
+

Added: webservices/savan/trunk/c/src/storage/registry/test.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test.c?rev=749877&view=auto
==============================================================================
    (empty)

Added: webservices/savan/trunk/c/src/storage/registry/test/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/test/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/registry/test/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1,26 @@
+TESTS = test_registry
+check_PROGRAMS = test_registry
+noinst_PROGRAMS = test_registry
+SUBDIRS =
+test_registry_SOURCES = test_registry.c xml.c main.c
+
+
+test_registry_LDADD   =	../libsavan_storage.la \
+				$(LDFLAGS) \
+				-L$(LIBCURL_LIBS) \
+                -L$(AXIS2C_HOME)/lib \
+                -laxutil \
+                -laxis2_axiom \
+				-lregistry_client \
+				-lcurl \
+                $(GUTHTHILA_LIBS)
+
+
+INCLUDES = -I$(top_builddir)/include \
+			-I$(top_builddir)/include/savan \
+			-I. \
+			@AXIS2INC@ \
+		   	@AXIOMINC@ \
+		   	@NEETHIINC@ \
+			@REGISTRYINC@ \
+		   	@UTILINC@

Added: webservices/savan/trunk/c/src/storage/registry/test/c.sh
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/c.sh?rev=749877&view=auto
==============================================================================
    (empty)

Added: webservices/savan/trunk/c/src/storage/registry/test/main.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/main.c?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/test/main.c (added)
+++ webservices/savan/trunk/c/src/storage/registry/test/main.c Wed Mar  4 01:53:01 2009
@@ -0,0 +1,18 @@
+int add_subscriber();
+void get_all_subscribers();
+void remove_subscriber();
+void get_all_subscribers_for_topic();
+char *test_endpoint_serialize();
+void test_endpoint_deserialize();
+
+int main(int argc, char** argv)
+{
+    char *content = 0;
+
+	add_subscriber();
+	get_all_subscribers();
+    /*get_all_subscribers_for_topic("/weather/4/system.subscriptions");*/
+    /*content = test_endpoint_serialize();
+    test_endpoint_deserialize(content);*/
+    return 0;
+}

Added: webservices/savan/trunk/c/src/storage/registry/test/synapse.sh
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/synapse.sh?rev=749877&view=auto
==============================================================================
    (empty)

Added: webservices/savan/trunk/c/src/storage/registry/test/test_registry.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/test_registry.c?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/test/test_registry.c (added)
+++ webservices/savan/trunk/c/src/storage/registry/test/test_registry.c Wed Mar  4 01:53:01 2009
@@ -0,0 +1,254 @@
+#include <remote_registry_rest_client.h>
+#include <remote_registry_conf.h>
+#include <stdio.h>
+#include <remote_registry.h>
+#include <remote_registry_resource.h>
+#include <axutil_uuid_gen.h>
+#include <axutil_property.h>
+
+#define SUBSCRIPTION_COLLECTION_NAME "system.subscriptions"
+#define TOPIC_INDEX "/eventing/index/TopicIndex"
+
+static void topic_index_init()
+{
+    remote_registry_t *remote_registry = NULL;
+    const axutil_env_t *env = NULL;
+    remote_registry_resource_t *res = NULL;
+    axis2_char_t *id = NULL;
+	
+    axis2_char_t *reg_url = "http://localhost:9762/registry";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");
+
+    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        res = remote_registry_resource_create(env);
+        id = axutil_strcat(env, reg_url, TOPIC_INDEX, NULL);
+        remote_registry_resource_set_properties(res, env, axutil_hash_make(env));
+        /*remote_registry_resource_set_author_name(res, env, "admin"); */
+        remote_registry_resource_set_description(res, env, "");
+        /*remote_registry_resource_set_last_modified_time(res, env, axutil_date_time_create(env));*/
+        remote_registry_put(remote_registry, env, TOPIC_INDEX, res);
+        return;
+    }
+}
+
+int add_subscriber()
+{
+    remote_registry_t *remote_registry = NULL;
+    const axutil_env_t *env = NULL;
+    axis2_char_t *subscription_id = NULL;
+    axis2_char_t *id = NULL;
+    axis2_char_t *path = NULL; 
+    axis2_char_t *index_path = NULL; 
+    remote_registry_resource_t *res = NULL;
+    axutil_hash_t *properties = NULL;
+	
+    char *content = (char *) strdup("<subscription><syn:endpoint xmlns:syn=\"http://ws.apache.org/ns/synapse\"><syn:address uri=\"http://localhost:9000/services/SimpleStockQuoteService\" /></syn:endpoint></subscription>");
+
+    axis2_char_t *epr_type = "application/vnd.epr";
+    axis2_char_t *filter = "/weather/4/";
+    axis2_char_t *reg_url = "http://localhost:9762/registry";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    subscription_id = axutil_strcat(env, "urn:uuid:", axutil_uuid_gen(env), NULL);
+    path = axutil_strcat(env, filter, SUBSCRIPTION_COLLECTION_NAME, "/", subscription_id, NULL);
+    id = axutil_strcat(env, reg_url, filter, SUBSCRIPTION_COLLECTION_NAME, "/", subscription_id, NULL);
+    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");
+
+    topic_index_init();
+    res = remote_registry_resource_create(env);
+    remote_registry_resource_set_content(res, env, content);
+    remote_registry_resource_set_content_len(res, env, axutil_strlen(content));
+    remote_registry_resource_set_media_type(res, env, epr_type);
+    remote_registry_resource_set_description(res, env, "");
+
+    properties = axutil_hash_make(env);
+    if(properties)
+    {
+        axutil_hash_set(properties, axutil_strdup(env, "expires"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "*"));
+        axutil_hash_set(properties, axutil_strdup(env, "staticFlag"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "false"));
+        axutil_hash_set(properties, axutil_strdup(env, "filterValue"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, filter));
+        axutil_hash_set(properties, axutil_strdup(env, "subManagerURI"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "http://10.100.1.44:8280/services/SampleEventSource"));
+        axutil_hash_set(properties, axutil_strdup(env, "filterDialect"), AXIS2_HASH_KEY_STRING, axutil_strdup(env, "http://synapse.apache.org/eventing/dialect/topicFilter"));
+        remote_registry_resource_set_properties(res, env, properties);
+    }
+
+    remote_registry_put(remote_registry, env, path, res);
+    if(id)
+    {
+        AXIS2_FREE(env->allocator, id);
+    }
+    if(path)
+    {
+        AXIS2_FREE(env->allocator, path);
+        path = NULL;
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+        res = NULL;
+    }
+
+    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        return 0;
+    }
+    id = axutil_strcat(env, reg_url, TOPIC_INDEX, NULL);
+    properties = remote_registry_resource_get_properties(res, env);
+    if(properties)
+    {
+        path = axutil_strcat(env, filter, SUBSCRIPTION_COLLECTION_NAME, NULL);
+        axutil_hash_set(properties, subscription_id, AXIS2_HASH_KEY_STRING, path);
+        remote_registry_resource_set_properties(res, env, properties);
+    }
+
+    remote_registry_resource_set_content(res, env, NULL);
+    remote_registry_resource_set_content_len(res, env, 0);
+    index_path = axutil_strcat(env, TOPIC_INDEX, "/TopicIndex", NULL);
+    remote_registry_put(remote_registry, env, TOPIC_INDEX, res);
+
+    if(id)
+    {
+        AXIS2_FREE(env->allocator, id);
+    }
+    if(res)
+    {
+        remote_registry_resource_free(res, env);
+        res = NULL;
+    }
+    printf("\n");
+
+    return 0;
+}
+
+void get_all_subscribers()
+{
+    remote_registry_t *remote_registry = NULL;
+    const axutil_env_t *env = NULL;
+    remote_registry_resource_t *res = NULL;
+    axutil_hash_t *properties = NULL;
+	
+    axis2_char_t *path = NULL;
+    axis2_char_t *reg_url = "http://localhost:9762/registry";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");
+
+    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        return;
+    }
+
+    properties = remote_registry_resource_get_properties(res, env);
+    if(properties)
+    {
+        axutil_hash_index_t *hi;
+        void *val;
+        void *key;
+        for (hi = axutil_hash_first(properties, env); hi; hi = axutil_hash_next(env, hi)) 
+        {
+            axutil_hash_this(hi, (const void**)&key, NULL, &val);
+            path = axutil_strcat(env, val, "/", key, NULL);
+            res = remote_registry_get(remote_registry, env, path, NULL);
+            if(res)
+            {
+                if(res)
+                {
+                    printf("\n\nresource id:%s\n\n",remote_registry_resource_get_id(res, env));
+                }
+            }
+
+            remove_subscriber((axis2_char_t *) key);
+        }
+    }
+
+    remote_registry_resource_free(res, env);
+}
+
+void get_all_subscribers_for_topic(axis2_char_t *topic)
+{
+    remote_registry_t *remote_registry = NULL;
+    const axutil_env_t *env = NULL;
+    remote_registry_resource_t *topic_resource = NULL;
+	
+    axis2_char_t *reg_url = "http://localhost:9762/registry";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");
+
+    topic_resource = remote_registry_get(remote_registry, env, topic, NULL);
+    if(topic_resource)
+    {
+        axutil_array_list_t *child_entries = NULL;
+        int i = 0;
+
+        child_entries = remote_registry_resource_get_entries(topic_resource, env);
+        if(child_entries)
+        {
+            /* load the child entries recursively */
+            for(i = 0; i < axutil_array_list_size(child_entries, env); i ++)
+            {
+                remote_registry_resource_t *child_resource = NULL;
+
+                child_resource = (remote_registry_resource_t*)axutil_array_list_get(child_entries, env, i);
+
+                /* loading the resources */
+                if(child_resource)
+                {
+                    printf("\n\nresource id:%s\n\n",remote_registry_resource_get_id(child_resource, env));
+                }
+            }
+        }
+    }
+}
+
+void remove_subscriber(axis2_char_t *id)
+{
+    remote_registry_t *remote_registry = NULL;
+    const axutil_env_t *env = NULL;
+    remote_registry_resource_t *res = NULL;
+    axis2_char_t *val;
+    axis2_status_t status = AXIS2_FAILURE;
+	
+    axis2_char_t *path = NULL;
+    axis2_char_t *reg_url = "http://localhost:9762/registry";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    remote_registry = remote_registry_create(env, reg_url, "admin", "admin");
+
+    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        return;
+    }
+
+    val = remote_registry_resource_get_property(res, env, id);
+    if(val)
+    {
+        path = axutil_strcat(env, val, "/", id, NULL);
+        printf("path:%s\n", path);
+        status = remote_registry_delete(remote_registry, env, path);
+    }
+    if(AXIS2_SUCCESS != status)
+    {
+        printf("\nSubscription deletion failed\n");
+    }
+
+    res = remote_registry_get(remote_registry, env, TOPIC_INDEX, NULL);
+    if(!res)
+    {
+        return;
+    }
+
+    remote_registry_resource_remove_property(res, env, id);
+
+    remote_registry_put(remote_registry, env, TOPIC_INDEX, res);
+    remote_registry_resource_free(res, env);
+}
+
+

Added: webservices/savan/trunk/c/src/storage/registry/test/xml.c
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/registry/test/xml.c?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/registry/test/xml.c (added)
+++ webservices/savan/trunk/c/src/storage/registry/test/xml.c Wed Mar  4 01:53:01 2009
@@ -0,0 +1,106 @@
+#include <axiom_namespace.h>
+#include <axiom_element.h>
+#include <axutil_env.h>
+#include <axutil_string.h>
+#include <stdio.h>
+
+char *test_endpoint_serialize()
+{
+    axiom_namespace_t *ns = NULL;
+    axiom_node_t *subs_node = NULL;
+    axiom_element_t *subs_elem = NULL;
+    axiom_node_t *endpoint_node = NULL;
+    axiom_element_t *endpoint_elem = NULL;
+    axiom_node_t *addr_node = NULL;
+    axiom_element_t *addr_elem = NULL;
+    axiom_attribute_t *url_attr = NULL;
+    char *content = NULL;
+    const axutil_env_t *env = NULL;
+    axis2_char_t *nsurl = "http://ws.apache.org/ns/synapse";
+    axis2_char_t *ns_prefix = "syn";
+    axis2_char_t *notifyto = "http://localhost:9000/services/SimpleStockQuoteService";
+    
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+    /* Format of the message is as 
+     * <subscription><syn:endpoint xmlns:syn="http://ws.apache.org/ns/synapse"><syn:address uri=
+     * "http://localhost:9000/services/SimpleStockQuoteService" /></syn:endpoint></subscription>
+     */
+    printf("\ncontent1:<subscription><syn:endpoint xmlns:syn=\"http://ws.apache.org/ns/synapse\"><syn:address uri=\"http://localhost:9000/services/SimpleStockQuoteService\" /></syn:endpoint></subscription>");
+    ns = axiom_namespace_create (env, nsurl, ns_prefix);
+
+    subs_elem = axiom_element_create(env, NULL, "subscription", NULL, &subs_node);
+    endpoint_elem = axiom_element_create(env, subs_node, "endpoint", ns, &endpoint_node);
+    addr_elem = axiom_element_create(env, endpoint_node, "address", ns, &addr_node);
+    url_attr = axiom_attribute_create(env, "url", notifyto, NULL);
+    axiom_element_add_attribute(addr_elem, env, url_attr, addr_node);
+
+    content = (char *) axiom_node_to_string(subs_node, env);
+    printf("\n\ncontent2:%s\n\n", content);
+
+    return content;
+}
+
+void test_endpoint_deserialize(char *content)
+{
+    axutil_qname_t *qname = NULL;
+    axiom_node_t *subs_node = NULL;
+    axiom_element_t *subs_element = NULL;
+    axiom_node_t *endpoint_node = NULL;
+    axiom_element_t *endpoint_element = NULL;
+    axiom_node_t *address_node = NULL;
+    axiom_element_t *address_element = NULL;
+    axis2_char_t *address = NULL;
+    const axutil_env_t *env = NULL;
+    axis2_char_t *nsurl = "http://ws.apache.org/ns/synapse";
+
+    env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+
+    subs_node = axiom_node_create_from_buffer(env, content);
+    subs_element = axiom_node_get_data_element(subs_node, env);
+    if(!subs_element)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_OM_ELEMENT_EXPECTED, AXIS2_FAILURE);
+        return;
+    }
+
+    qname = axutil_qname_create(env, "endpoint", nsurl, NULL);
+    if(!qname)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return;
+    }
+
+    endpoint_element = axiom_element_get_first_child_with_qname(subs_element, env, qname, 
+            subs_node, &endpoint_node);
+
+    if(qname)
+    {
+        axutil_qname_free(qname, env);
+    }
+
+    qname = axutil_qname_create(env, "address", nsurl, NULL);
+    if(!qname)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return;
+    }
+
+    address_element = axiom_element_get_first_child_with_qname(endpoint_element, env, qname, 
+            endpoint_node, &address_node);
+
+    if(qname)
+    {
+        axutil_qname_free(qname, env);
+    }
+
+    address = axiom_element_get_attribute_value_by_name(address_element, env, "url");
+    
+    if(!address)
+    {
+        AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_OM_ELEMENT_INVALID_STATE, AXIS2_FAILURE);
+        return; 
+    }
+
+    printf("\naddress:%s\n\n", address);
+}
+

Added: webservices/savan/trunk/c/src/storage/service/Makefile
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/service/Makefile?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/service/Makefile (added)
+++ webservices/savan/trunk/c/src/storage/service/Makefile Wed Mar  4 01:53:01 2009
@@ -0,0 +1,460 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# src/storage/service/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/savanc-src
+pkglibdir = $(libdir)/savanc-src
+pkgincludedir = $(includedir)/savanc-src
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+target_triplet = i686-pc-linux-gnu
+subdir = src/storage/service
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libsavan_storage_la_DEPENDENCIES =  \
+	../common/libsavan_common_storage.la
+am_libsavan_storage_la_OBJECTS = service_storage_mgr.lo
+libsavan_storage_la_OBJECTS = $(am_libsavan_storage_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libsavan_storage_la_SOURCES)
+DIST_SOURCES = $(libsavan_storage_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/damitha/projects/savanc/missing --run aclocal-1.10
+AMTAR = ${SHELL} /home/damitha/projects/savanc/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/damitha/projects/savanc/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/damitha/projects/savanc/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/damitha/projects/savanc/missing --run automake-1.10
+AWK = mawk
+AXIOMINC = -I/home/damitha/projects/savanc/../axis2c/axiom/include
+AXIS2INC = -I/axis2c/deploy/include/axis2-1.5.0
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -DSAVAN_FILTERING -I/usr/include/libxml2   
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DSYMUTIL = 
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = -lpthread -lxslt
+LIBOBJS = 
+LIBS = -ldl 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/damitha/projects/savanc/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NEETHIINC = -I/home/damitha/projects/savanc/../axis2c/neethi/include
+NMEDIT = 
+OBJEXT = o
+PACKAGE = savanc-src
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = savanc-src
+PACKAGE_STRING = savanc-src 0.90
+PACKAGE_TARNAME = savanc-src
+PACKAGE_VERSION = 0.90
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+RANLIB = ranlib
+REGISTRYINC = -I/axis2c/deploy/include/registry-0.1.0
+SAVAN_STORAGE = registry
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/bash
+STRIP = strip
+SVC_DIR = 
+UTILINC = -I/home/damitha/projects/savanc/../axis2c/util/include
+VERSION = 0.90
+XMLSCHEMAINC = 
+XSLT_CFLAGS = -I/usr/include/libxml2  
+XSLT_LIBS = -lxslt -lxml2  
+abs_builddir = /home/damitha/projects/savanc/src/storage/service
+abs_srcdir = /home/damitha/projects/savanc/src/storage/service
+abs_top_builddir = /home/damitha/projects/savanc
+abs_top_srcdir = /home/damitha/projects/savanc
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = tar --format=ustar -chf - "$$tardir"
+am__untar = tar -xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /home/damitha/projects/savanc/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /axis2c/deploy
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+subdirs =  samples
+sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
+target_alias = 
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+top_builddir = ../../..
+top_srcdir = ../../..
+noinst_LTLIBRARIES = libsavan_storage.la
+libsavan_storage_la_SOURCES = service_storage_mgr.c
+libsavan_storage_la_LIBADD = ../common/libsavan_common_storage.la
+INCLUDES = -I$(top_builddir)/include \
+			-I$(top_builddir)/include/savan \
+			-I. \
+			-I/axis2c/deploy/include/axis2-1.5.0 \
+		   	-I/home/damitha/projects/savanc/../axis2c/axiom/include \
+		   	-I/home/damitha/projects/savanc/../axis2c/neethi/include \
+		   	-I/home/damitha/projects/savanc/../axis2c/util/include
+
+EXTRA_DIST = 
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/storage/service/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/storage/service/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libsavan_storage.la: $(libsavan_storage_la_OBJECTS) $(libsavan_storage_la_DEPENDENCIES) 
+	$(LINK)  $(libsavan_storage_la_OBJECTS) $(libsavan_storage_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/service_storage_mgr.Plo
+
+.c.o:
+	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: webservices/savan/trunk/c/src/storage/service/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/savan/trunk/c/src/storage/service/Makefile.am?rev=749877&view=auto
==============================================================================
--- webservices/savan/trunk/c/src/storage/service/Makefile.am (added)
+++ webservices/savan/trunk/c/src/storage/service/Makefile.am Wed Mar  4 01:53:01 2009
@@ -0,0 +1,15 @@
+noinst_LTLIBRARIES = libsavan_storage.la
+
+libsavan_storage_la_SOURCES = service_storage_mgr.c
+
+libsavan_storage_la_LIBADD = ../common/libsavan_common_storage.la
+
+INCLUDES = -I$(top_builddir)/include \
+			-I$(top_builddir)/include/savan \
+			-I. \
+			@AXIS2INC@ \
+		   	@AXIOMINC@ \
+		   	@NEETHIINC@ \
+		   	@UTILINC@
+
+EXTRA_DIST=