Author: damitha
Date: Fri Feb 1 00:45:02 2008
New Revision: 617371
URL: http://svn.apache.org/viewvc?rev=617371&view=rev
Log:
Removing unneccessary code. Also placing a AXIS2_USLEEP in the callback function
Modified:
webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c?rev=617371&r1=617370&r2=617371&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c Fri Feb 1
00:45:02 2008
@@ -265,6 +265,7 @@
/* We are done with the callback */
break;
}
+ AXIS2_USLEEP(100000);
}
return;
}
Modified:
webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c?rev=617371&r1=617370&r2=617371&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
(original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
Fri Feb 1 00:45:02 2008
@@ -31,23 +31,6 @@
#define SANDESHA2_MAX_COUNT 8
-/* on_complete callback function */
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env);
-
-/* on_error callback function */
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception);
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback);
-
static void
usage(
axis2_char_t *prog_name);
@@ -71,10 +54,6 @@
int c;
/* Set up the environment */
- /*env = axutil_env_create_all("rm_echo_single_1_0.log",
- AXIS2_LOG_LEVEL_INFO);*/
- /*env = axutil_env_create_all("rm_echo_single_1_0.log",
- AXIS2_LOG_LEVEL_ERROR);*/
env = axutil_env_create_all("rm_echo_single_1_0.log",
AXIS2_LOG_LEVEL_TRACE);
@@ -252,85 +231,6 @@
return 0;
}
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env)
-{
- /** SOAP response has arrived here; get the soap envelope
- from the callback object and do whatever you want to do with it */
-
- axiom_soap_envelope_t *soap_envelope = NULL;
- axiom_node_t *ret_node = NULL;
- axis2_status_t status = AXIS2_SUCCESS;
-
- soap_envelope = axis2_callback_get_envelope(callback, env);
-
- if (!soap_envelope)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error
code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("echo stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
-
- if(!ret_node)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Stub invoke FAILED: Error code:%d :: %s",
- env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("echo stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- axis2_char_t *om_str = NULL;
- om_str = axiom_node_to_string(ret_node, env);
- if (om_str)
- {
- printf("\nReceived OM : %s\n", om_str);
- AXIS2_FREE(env->allocator, om_str);
- }
- printf("\necho client invoke SUCCESSFUL!\n");
- }
- }
- return status;
-}
-
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception)
-{
- /** take necessary action on error */
- printf("\nEcho client invoke FAILED. Error code:%d ::%s", exception,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return AXIS2_SUCCESS;
-}
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback)
-{
- /** Wait till callback is complete. Simply keep the parent thread running
- until our on_complete or on_error is invoked */
- while(1)
- {
- if (axis2_callback_get_complete(callback, env))
- {
- /* We are done with the callback */
- break;
- }
- }
- return;
-}
-
static void
usage(
axis2_char_t *prog_name)
@@ -342,5 +242,4 @@
" default is http://127.0.0.1:9090/axis2/services/RMSampleService \n");
fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
}
-
Modified:
webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c?rev=617371&r1=617370&r2=617371&view=diff
==============================================================================
---
webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
(original)
+++
webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
Fri Feb 1 00:45:02 2008
@@ -32,23 +32,6 @@
#define SANDESHA2_SLEEP 12
-/* on_complete callback function */
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env);
-
-/* on_error callback function */
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception);
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback);
-
static void
usage(
axis2_char_t *prog_name);
@@ -195,82 +178,6 @@
}
return 0;
-}
-
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_complete(
- struct axis2_callback *callback,
- const axutil_env_t *env)
-{
- /** SOAP response has arrived here; get the soap envelope
- from the callback object and do whatever you want to do with it */
-
- axiom_soap_envelope_t *soap_envelope = NULL;
- axiom_node_t *ret_node = NULL;
- axis2_status_t status = AXIS2_SUCCESS;
-
- soap_envelope = axis2_callback_get_envelope(callback, env);
-
- if (!soap_envelope)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error
code:"
- " %d :: %s", env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("echo stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
-
- if(!ret_node)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Stub invoke FAILED: Error code:%d :: %s",
- env->error->error_number,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- printf("echo stub invoke FAILED!\n");
- status = AXIS2_FAILURE;
- }
- else
- {
- axis2_char_t *om_str = NULL;
- om_str = axiom_node_to_string(ret_node, env);
- if (om_str)
- printf("\nReceived OM : %s\n", om_str);
- printf("\necho client invoke SUCCESSFUL!\n");
- }
- }
- return status;
-}
-
-axis2_status_t AXIS2_CALL
-rm_echo_callback_on_error(
- struct axis2_callback *callback,
- const axutil_env_t *env,
- int exception)
-{
- /** take necessary action on error */
- printf("\nEcho client invoke FAILED. Error code:%d ::%s", exception,
- AXIS2_ERROR_GET_MESSAGE(env->error));
- return AXIS2_SUCCESS;
-}
-
-void wait_on_callback(
- const axutil_env_t *env,
- axis2_callback_t *callback)
-{
- /** Wait till callback is complete. Simply keep the parent thread running
- until our on_complete or on_error is invoked */
- while(1)
- {
- if (axis2_callback_get_complete(callback, env))
- {
- /* We are done with the callback */
- break;
- }
- }
- return;
}
static void
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]