You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by pe...@apache.org on 2004/10/05 17:44:44 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/client/cpp CalculatorClient.cpp ExceptionTestClient.cpp FaultMappingClient.cpp SimpleArrayClient.cpp SimpleRefClient.cpp
perryan 2004/10/05 08:44:44
Modified: c/tests/auto_build/testcases/client/cpp CalculatorClient.cpp
ExceptionTestClient.cpp FaultMappingClient.cpp
SimpleArrayClient.cpp SimpleRefClient.cpp
Log:
Modified to allow a different endpoint to be passed in as an argument.
Fixed typos which stopped compilation.
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.4 +1 -1 ws-axis/c/tests/auto_build/testcases/client/cpp/CalculatorClient.cpp
Index: CalculatorClient.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/CalculatorClient.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CalculatorClient.cpp 8 Sep 2004 13:38:36 -0000 1.3
+++ CalculatorClient.cpp 5 Oct 2004 15:44:40 -0000 1.4
@@ -30,7 +30,7 @@
if (strcmp(op, "add") == 0)
{
iResult = ws.add(i1, i2);
- ws.getFaultDetail(&pcDetail);
+ //ws.getFaultDetail(&pcDetail);
printf("%d\n", iResult);
/*printf("pcDetail:%s\n", pcDetail);*/
}
1.2 +16 -5 ws-axis/c/tests/auto_build/testcases/client/cpp/ExceptionTestClient.cpp
Index: ExceptionTestClient.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/ExceptionTestClient.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ExceptionTestClient.cpp 19 Aug 2004 07:27:24 -0000 1.1
+++ ExceptionTestClient.cpp 5 Oct 2004 15:44:41 -0000 1.2
@@ -10,14 +10,17 @@
char endpoint[256];
const char* server="localhost";
const char* port="80";
+ const char* url="http://localhost:80/axis/MathOps";
const char* op = 0;
- const char* p1 = 0;
+ char* p1 = 0;
const char* p2 = 0;
int p3 = 0;
int i1=0, i2=0;
int iResult;
char* pcDetail;
+ url = argv[1];
+
op = "div";
i1 = 10;
@@ -35,7 +38,8 @@
/* Sends a normal request. the result should be the division of
* two numbers the user has provided
*/
- sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
+ //sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
+ sprintf(endpoint, "%s", url);
break;
case 1:
@@ -43,7 +47,10 @@
* Exception : AxisSoapException:Soap action is empty
* should be returned to the user.
*/
- sprintf(endpoint, "http://%s:%s/axis", server, port);
+ //sprintf(endpoint, "http://%s:%s/axis", server, port);
+ sprintf(endpoint, "%s", url);
+ p1 = strrchr(endpoint, '/');
+ *p1 = (char)NULL; // Set a NULL at the last '/' char to strip the service endpoint interface
break;
case 2:
@@ -51,7 +58,10 @@
* Exception : AxisWsddException:Requested service not found
* should be returned to the user.
*/
- sprintf(endpoint, "http://%s:%s/axis/Math", server, port);
+ //sprintf(endpoint, "http://%s:%s/axis/Math", server, port);
+ sprintf(endpoint, "%s", url);
+ p1 = endpoint + (strlen(endpoint) - 3);
+ *p1 = (char)NULL; // Set a NULL to strip the last 3 chars
break;
case 3:
@@ -74,10 +84,11 @@
break;
default:
- printf("Invalide option for the last parameter\n\n");
+ printf("Invalid option for the last parameter\n\n");
return 0;
}
//sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
+ printf("ENDPOINT = %s\n", endpoint);
MathOps ws(endpoint);
iResult = ws.div(i1, i2);
printf("Result is:%d\n", iResult);
1.2 +4 -1 ws-axis/c/tests/auto_build/testcases/client/cpp/FaultMappingClient.cpp
Index: FaultMappingClient.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/FaultMappingClient.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FaultMappingClient.cpp 19 Aug 2004 07:27:24 -0000 1.1
+++ FaultMappingClient.cpp 5 Oct 2004 15:44:42 -0000 1.2
@@ -9,6 +9,7 @@
{
char endpoint[256];
const char* server="localhost";
+ const char* url="http://localhost:80/axis/MathOps";
const char* port="80";
const char* op = 0;
const char* p1 = 0;
@@ -17,7 +18,9 @@
int iResult;
char* pcDetail;
- sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
+ url = argv[1];
+
+ sprintf(endpoint, "%s", url);
MathOps ws(endpoint);
op = "div";
1.2 +5 -3 ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayClient.cpp
Index: SimpleArrayClient.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayClient.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SimpleArrayClient.cpp 7 Sep 2004 10:55:27 -0000 1.1
+++ SimpleArrayClient.cpp 5 Oct 2004 15:44:43 -0000 1.2
@@ -13,15 +13,17 @@
int x;
char buffer1[100];
char endpoint[256];
+ const char* url="http://localhost:80/axis/MathOps";
const char* server="localhost";
const char* port="80";
+ url = argv[1];
try
{
- printf("Sending Requests to Server http://%s:%s ........\n\n", server, port);
- sprintf(endpoint, "http://%s:%s/axis/array", server, port);
+ printf("Sending Requests to Server %s ........\n\n", url);
+ sprintf(endpoint, "%s", url);
ArrayTestPortType ws(endpoint);
//testing echoIntArray
- intArrayType arrin;
+ IntArrayType arrin;
arrin.intItem.m_Array = new int[ARRAYSIZE];
arrin.intItem.m_Size = ARRAYSIZE;
for (x=0;x<ARRAYSIZE;x++)
1.2 +5 -3 ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleRefClient.cpp
Index: SimpleRefClient.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleRefClient.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SimpleRefClient.cpp 7 Sep 2004 10:55:27 -0000 1.1
+++ SimpleRefClient.cpp 5 Oct 2004 15:44:44 -0000 1.2
@@ -13,19 +13,21 @@
int x;
char buffer1[100];
char endpoint[256];
+ const char* url="http://localhost:80/axis/MathOps";
const char* server="localhost";
const char* port="80";
+ url = argv[1];
try
{
- printf("Sending Requests to Server http://%s:%s ........\n\n", server, port);
- sprintf(endpoint, "http://%s:%s/axis/ref", server, port);
+ printf("Sending Requests to Server %s ........\n\n", url);
+ sprintf(endpoint, "%s", url);
//endpoint for Axis Java sample
//sprintf(endpoint, "http://%s:%s/axis/services/echo", server, port);
RefTestPortType ws(endpoint);
printf("invoking echoInt..\n");
- intType refint;
+ IntType refint;
refint.intItem =56;
if ((ws.echoInt(&refint))->intItem == 56)