summaryrefslogtreecommitdiffstats
path: root/samples/client
diff options
context:
space:
mode:
authorGravatar damitha2010-06-27 05:47:26 +0000
committerGravatar damitha2010-06-27 05:47:26 +0000
commit0cf55ca9de5bdcac29344a30d7c90a6924a1ac11 (patch)
treef13522d4f7efd7122def44b67eaef36b47fa80a3 /samples/client
parent3203263e743a2e940a4f8c874b1f3952308d67bc (diff)
downloadaxis2c-0cf55ca9de5bdcac29344a30d7c90a6924a1ac11.tar.gz
axis2c-0cf55ca9de5bdcac29344a30d7c90a6924a1ac11.tar.bz2
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@958327 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'samples/client')
-rw-r--r--samples/client/session/session.c68
1 files changed, 24 insertions, 44 deletions
diff --git a/samples/client/session/session.c b/samples/client/session/session.c
index c48a7af..0c1efa0 100644
--- a/samples/client/session/session.c
+++ b/samples/client/session/session.c
@@ -38,8 +38,7 @@ main(
axis2_svc_client_t *svc_client = NULL;
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
- axiom_node_t *payload2 = NULL;
- axiom_node_t *ret_node2 = NULL;
+ int i = 0;
/* Set up the environment */
env = axutil_env_create_all("session.log", AXIS2_LOG_LEVEL_TRACE);
@@ -101,52 +100,33 @@ main(
/* Engage addressing module */
axis2_svc_client_engage_module(svc_client, env, AXIS2_MODULE_ADDRESSING);
- /* Build the SOAP request message payload using OM API. */
- payload = build_om_payload_for_echo_svc(env);
/* Send request */
- ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
-
- if (ret_node)
- {
- 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");
-
- AXIS2_FREE(env->allocator, om_str);
- ret_node = NULL;
- }
- else
- {
- 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 client invoke FAILED!\n");
- }
-
- payload2 = build_om_payload_for_echo_svc(env);
- ret_node2 = axis2_svc_client_send_receive(svc_client, env, payload2);
- if (ret_node2)
+ for(i = 0; i < 5; i++)
{
- axis2_char_t *om_str = NULL;
- om_str = axiom_node_to_string(ret_node2, env);
- if (om_str)
- printf("\nReceived OM : %s\n", om_str);
- printf("\necho client invoke SUCCESSFUL!\n");
+ /* Build the SOAP request message payload using OM API. */
+ payload = build_om_payload_for_echo_svc(env);
+ ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
- AXIS2_FREE(env->allocator, om_str);
- ret_node2 = NULL;
- }
- else
- {
- 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 client invoke FAILED!\n");
+ if (ret_node)
+ {
+ 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");
+
+ AXIS2_FREE(env->allocator, om_str);
+ ret_node = NULL;
+ }
+ else
+ {
+ 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 client invoke FAILED!\n");
+ }
}
if (svc_client)