Author: damitha
Date: Fri Jan 19 19:56:03 2007
New Revision: 498064
URL: http://svn.apache.org/viewvc?view=rev&rev=498064
Log:
Added code to identifiy client database and server database from
axis2c home environment variable. Also fixed a bug in client rm_1_1_echo
sample
Modified:
webservices/sandesha/trunk/c/include/sandesha2_constants.h
webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?view=diff&rev=498064&r1=498063&r2=498064
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Fri Jan 19
19:56:03 2007
@@ -494,6 +494,7 @@
#define SANDESHA2_IN_MESSAGE_STORAGE_KEY "InMsgStoreKey"
#define SANDESHA2_PERSISTANT_PROPERTY_SEPERATOR ",,,"
#define SANDESHA2_BUSY_WAIT_TIME 8
+ #define SANDESHA2_IS_SVR_SIDE "is_svr_side"
/** @} */
#ifdef __cplusplus
}
Modified: webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c?view=diff&rev=498064&r1=498063&r2=498064
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_1_1_echo/rm_echo_client.c Fri Jan
19 19:56:03 2007
@@ -82,7 +82,7 @@
/* Set end point reference of echo service */
/*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
address = "http://127.0.0.1:5555/axis2/services/RMSampleService";
- while ((c = AXIS2_GETOPT(argc, argv, ":a:o:v:")) != -1)
+ while ((c = AXIS2_GETOPT(argc, argv, ":a:o:m:")) != -1)
{
switch (c)
@@ -132,6 +132,7 @@
"__OPERATION_OUT_IN__");
if(single_channel)
{
+ printf("camex\n");
reply_to = axis2_endpoint_ref_create(env, AXIS2_WSA_ANONYMOUS_URL);
offer = AXIS2_TRUE;
}
@@ -324,10 +325,10 @@
fprintf(stdout, " [-o OFFER]");
fprintf(stdout, " [-m SINGLE CHANNEL]");
fprintf(stdout, " Options :\n");
- fprintf(stdout, "\t-v SINGLE CHANNEL \t single channel.. The" \
- " default behaviour is single channel \n");
+ fprintf(stdout, "\t-m SINGLE CHANNEL \t single channel.. Type 0 for not to
use single channel. The" \
+ " default behaviour is single channel(1) \n");
fprintf(stdout, "\t-o OFFER \t seq offer value.. Type 1 for sequence
offer" \
- "feature. The default behaviour is no offer. \n");
+ "feature. The default behaviour is no offer(0). \n");
fprintf(stdout, "\t-a ADDRESS \t endpoint address.. The" \
" default is http://127.0.0.1:5555/axis2/services/RMSampleService \n");
fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
Modified:
webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c?view=diff&rev=498064&r1=498063&r2=498064
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
(original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Fri
Jan 19 19:56:03 2007
@@ -128,6 +128,14 @@
return AXIS2_FAILURE;
}
ctx = AXIS2_MSG_CTX_GET_BASE(msg_ctx, env);
+ if(!axis2_msg_ctx_get_server_side(msg_ctx, env))
+ {
+ axis2_ctx_t *conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
+ axis2_property_t *property = axis2_property_create_with_args(env, 0,
0,
+ 0, NULL);
+ AXIS2_CTX_SET_PROPERTY(conf_ctx_base, env, SANDESHA2_IS_SVR_SIDE,
+ property, AXIS2_FALSE);
+ }
conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
soap_envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c?view=diff&rev=498064&r1=498063&r2=498064
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Fri Jan
19 19:56:03 2007
@@ -103,6 +103,14 @@
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL,
AXIS2_FAILURE);
return AXIS2_FAILURE;
}
+ if(!axis2_msg_ctx_get_server_side(msg_ctx, env))
+ {
+ axis2_ctx_t *conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
+ axis2_property_t *property = axis2_property_create_with_args(env, 0,
0,
+ 0, NULL);
+ AXIS2_CTX_SET_PROPERTY(conf_ctx_base, env, SANDESHA2_IS_SVR_SIDE,
+ property, AXIS2_FALSE);
+ }
svc = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
if(!svc)
{
Modified:
webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c?view=diff&rev=498064&r1=498063&r2=498064
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
(original)
+++ webservices/sandesha/trunk/c/src/storage/permanent/permanent_transaction.c
Fri Jan 19 19:56:03 2007
@@ -119,8 +119,23 @@
prop_bean = (sandesha2_property_bean_t *)sandesha2_utils_get_property_bean(
env, conf);
path = sandesha2_property_bean_get_db_path(prop_bean, env);
- db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR, "sandesha2", NULL);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "db_name %s", db_name);
+ if(conf_ctx)
+ {
+ axis2_ctx_t *conf_ctx_base = axis2_conf_ctx_get_base(conf_ctx, env);
+ axis2_property_t *property = axis2_ctx_get_property(conf_ctx_base,
env,
+ SANDESHA2_IS_SVR_SIDE, AXIS2_FALSE);
+ if(!property)
+ {
+ db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
+ "sandesha2_svr_db", NULL);
+ }
+ else
+ {
+ db_name = axis2_strcat(env, path, AXIS2_PATH_SEP_STR,
+ "sandesha2_client_db", NULL);
+ }
+ }
+ AXIS2_LOG_INFO(env->log, "db_name %s", db_name);
rc = sqlite3_open(db_name, &(trans_impl->dbconn));
if(rc != SQLITE_OK)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]