ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r700715 - /webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c
Date Wed, 01 Oct 2008 08:46:45 GMT
Author: damitha
Date: Wed Oct  1 01:46:45 2008
New Revision: 700715

URL: http://svn.apache.org/viewvc?rev=700715&view=rev
Log:
Updating the sample

Modified:
    webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c

Modified: webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c?rev=700715&r1=700714&r2=700715&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_ping_1_1/rm_ping_1_1.c Wed Oct  1 01:46:45 2008
@@ -50,6 +50,7 @@
     axiom_node_t *payload = NULL;
     axutil_property_t *property = NULL;
     int c;
+    int i = 0;
     neethi_policy_t *policy = NULL;
     axis2_status_t status = AXIS2_FAILURE;
    
@@ -89,7 +90,9 @@
     /* Setup options */
     options = axis2_options_create(env);
     if(endpoint_ref)
+    {
         axis2_options_set_to(options, env, endpoint_ref);
+    }
     /*axis2_options_set_action(options, env, "urn:wsrm:Ping");*/
 
     /* Set up deploy folder. It is from the deploy folder, the configuration is 
@@ -154,23 +157,27 @@
                 property);
         }
     }
-    /* Send request */
-    payload = build_om_programatically(env, "ping1", seq_key);
-    status = axis2_svc_client_send_robust(svc_client, env, payload);
-    if(status)
-        printf("\nping client invoke SUCCESSFUL!\n");
-    payload = NULL;
-    
-    payload = build_om_programatically(env, "ping2", seq_key);
-    status = axis2_svc_client_send_robust(svc_client, env, payload);
-    if(status)
-        printf("\nping client invoke SUCCESSFUL!\n");
-    payload = NULL;
-
-    payload = build_om_programatically(env, "ping3", seq_key);
-    status = axis2_svc_client_send_robust(svc_client, env, payload);
-    if(status)
-        printf("\nping client invoke SUCCESSFUL!\n");
+
+    for(i = 1; i < 4; i++)
+    {
+        axis2_char_t echo_str[7];
+        
+        sprintf(echo_str, "%s%d", "echo", i);
+
+        /* Send request */
+        payload = build_om_programatically(env, echo_str, seq_key);
+        status = axis2_svc_client_send_robust(svc_client, env, payload);
+        if(status)
+        {
+            printf("\nping client invoke SUCCESSFUL!\n");
+        }
+        else
+        {
+            printf("\nping client invoke FAILED!\n");
+        }
+        payload = NULL;
+    }
+
     AXIS2_SLEEP(MAX_COUNT);
     
     sandesha2_client_terminate_seq_with_svc_client(env, svc_client, NULL);



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message