[Carbon-dev] svn commit r31399 - trunk/solutions/wsf/c/registry_client/test
damitha at wso2.com
damitha at wso2.com
Tue Feb 24 00:04:57 PST 2009
Author: damitha
Date: Tue Feb 24 00:04:56 2009
New Revision: 31399
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31399
Log:
Modified:
trunk/solutions/wsf/c/registry_client/test/main.c
trunk/solutions/wsf/c/registry_client/test/subscriber.c
Modified: trunk/solutions/wsf/c/registry_client/test/main.c
URL: http://wso2.org/svn/browse/wso2/trunk/solutions/wsf/c/registry_client/test/main.c?rev=31399&r1=31398&r2=31399&view=diff
==============================================================================
--- trunk/solutions/wsf/c/registry_client/test/main.c (original)
+++ trunk/solutions/wsf/c/registry_client/test/main.c Tue Feb 24 00:04:56 2009
@@ -3,7 +3,7 @@
int comment_test_main();
int reg_test_main();
int put_test_main();
-int reg_put_full_test_main();
+int add_subscriber();
int main() {
/*rest_test_main();
@@ -12,5 +12,5 @@
comment_test_main();
put_test_main();*/
- reg_put_full_test_main();
+ add_subscriber();
}
Modified: trunk/solutions/wsf/c/registry_client/test/subscriber.c
URL: http://wso2.org/svn/browse/wso2/trunk/solutions/wsf/c/registry_client/test/subscriber.c?rev=31399&r1=31398&r2=31399&view=diff
==============================================================================
--- trunk/solutions/wsf/c/registry_client/test/subscriber.c (original)
+++ trunk/solutions/wsf/c/registry_client/test/subscriber.c Tue Feb 24 00:04:56 2009
@@ -8,19 +8,15 @@
int add_subscriber()
{
remote_registry_t *remote_registry = NULL;
- remote_registry_t *remote_registry2 = NULL;
const axutil_env_t *env = NULL;
axis2_char_t *path = "/weather/4/system.subscriptions/urn:uuid:85a06d85-6586-464c-8a2e-487e364351b3";
remote_registry_resource_t *res = NULL;
- remote_registry_resource_t *res2 = NULL;
axutil_hash_t *properties = NULL;
+ int res_len = 0;
- axutil_hash_t *properties2 = NULL;
-
char *content = strdup("<subscription><syn:endpoint xmlns:syn=\"http://ws.apache.org/ns/synapse\"><syn:address "\
"uri=\"http://localhost:9000/services/SimpleStockQuoteService\" /></syn:endpoint></subscription>");
- int res_len = 0;
axis2_char_t *id = "http://localhost:9762/registry/atom/weather/4/system.subscriptions/urn:uuid:85a06d85-6586-464c-8a2e-487e364351b3";
axis2_char_t *subs_col_name = "system.subscriptions";
axis2_char_t *epr_type = "application/vnd.epr";
@@ -28,14 +24,14 @@
env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
/*remote_registry = remote_registry_create(env, "https://localhost:9443/registry/atom", "admin", "admin");*/
- remote_registry2 = remote_registry_create(env, "http://localhost:9762/registry/atom", "admin", "admin");
+ remote_registry = remote_registry_create(env, "http://localhost:9762/registry/atom", "admin", "admin");
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_id(res, env, id);
- remote_registry_resource_set_media_type(res, env, "application/vnd.epr");
- remote_registry_resource_set_title(res, env, "/weather/4/system.subscriptions/urn:uuid:85a06d85-6586-464c-8a2e-487e364351b3");
+ remote_registry_resource_set_media_type(res, env, epr_type);
+ remote_registry_resource_set_title(res, env, path);
remote_registry_resource_set_author_username(res, env, "admin");
remote_registry_resource_set_description(res, env, "");
remote_registry_resource_set_last_modified_time(res, env, axutil_date_time_create(env));
@@ -51,16 +47,16 @@
remote_registry_resource_set_properties(res, env, properties);
}
- remote_registry_put_resource(remote_registry2, env, path, res);
+ remote_registry_put_resource(remote_registry, env, path, res);
- /*res2 = remote_registry_get(remote_registry2, env, topic_index, NULL);
- if(properties2)
+ /*res = remote_registry_get(remote_registry, env, topic_index, NULL);
+ if(properties)
{
- axutil_hash_set(properties2, id, AXIS2_HASH_KEY_STRING, "/weather/4/system.subscriptions");
- remote_registry_resource_set_properties(res2, env, properties2);
+ axutil_hash_set(properties, id, AXIS2_HASH_KEY_STRING, "/weather/4/system.subscriptions");
+ remote_registry_resource_set_properties(res, env, properties);
}
- printf("\nresource id:%s\n",remote_registry_resource_get_id(res2, env));
- remote_registry_put_resource(remote_registry2, env, topic_index, res2); */
+ printf("\nresource id:%s\n",remote_registry_resource_get_id(res, env));
+ remote_registry_put_resource(remote_registry, env, topic_index, res); */
/*res = remote_registry_get_recursively(remote_registry, env, path, NULL);
More information about the Carbon-dev
mailing list