ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r371827 - /webservices/axis2/trunk/c/test/core/clientapi/test_client.c
Date Tue, 24 Jan 2006 05:52:41 GMT
Author: samisa
Date: Mon Jan 23 21:52:37 2006
New Revision: 371827

URL: http://svn.apache.org/viewcvs?rev=371827&view=rev
Log:

Added getopt 

Modified:
    webservices/axis2/trunk/c/test/core/clientapi/test_client.c

Modified: webservices/axis2/trunk/c/test/core/clientapi/test_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/clientapi/test_client.c?rev=371827&r1=371826&r2=371827&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/clientapi/test_client.c (original)
+++ webservices/axis2/trunk/c/test/core/clientapi/test_client.c Mon Jan 23 21:52:37 2006
@@ -19,22 +19,29 @@
     char *hostname = "localhost";
     char *port = "9090";
     char *filename = "soap_req";
+    char* endpoint = "/axis2/services/echo/echo";
+    char c;
+    extern char *optarg;
     
-    if (argc > 1) 
+    while ((c = getopt(argc, argv, ":h:p:f:e:")) != -1) 
     {
-        hostname = argv[1];
+        switch(c) 
+        {
+            case 'h':
+                hostname = optarg;
+                break;
+            case 'p':
+                port = optarg;
+                break;
+            case 'f':
+                filename = optarg;
+                break;
+            case 'e':
+                endpoint = optarg;
+                break;
+        }
     }
 
-    if (argc > 2) 
-    {
-        port = argv[2];
-    }
-    
-    if (argc > 3) 
-    {
-        filename = argv[3];
-    }
-    
 	write_to_socket(hostname, port, filename);
     return 0;
 }



Mime
View raw message