You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/09/19 17:13:50 UTC

svn commit: r447874 - /webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c

Author: samisa
Date: Tue Sep 19 08:13:49 2006
New Revision: 447874

URL: http://svn.apache.org/viewvc?view=rev&rev=447874
Log:
FIxed REST sample command line param processing

Modified:
    webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c

Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c?view=diff&rev=447874&r1=447873&r2=447874
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Tue Sep 19 08:13:49 2006
@@ -43,14 +43,31 @@
         {
             method_get = AXIS2_TRUE;
         }
-        if (0 == AXIS2_STRCMP(argv[1], "-h"))
+        else if (0 == AXIS2_STRCMP(argv[1], "-h"))
         {
             printf("Usage : %s [endpoint_url]", argv[0]);
             printf(" or %s -mGET for HTTP GET\n", argv[0]);
             printf("use -h for help\n");
             return 0;
         }
+        else
+        {
+            address = argv[1];
+        }
+    }
+
+    if (argc > 2)
+    {
+        if (0 == strncmp(argv[2], "-mGET", 2))
+        {
+            method_get = AXIS2_TRUE;
+        }
+        else
+        {
+            address = argv[2];
+        }
     }
+
     printf("Using endpoint : %s\n", address);
 
     /* Create EPR with given address */



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