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 di...@apache.org on 2006/01/18 11:16:50 UTC
svn commit: r370105 - in
/webservices/axis/trunk/c/tests/auto_build/testcases: ./ client/cpp/
output/ tests/
Author: dicka
Date: Wed Jan 18 02:16:34 2006
New Revision: 370105
URL: http://svn.apache.org/viewcvs?rev=370105&view=rev
Log:
Update testcase following recent change to get/setTransportProperties API.
Also taken opportunity to tidy up testcase and include within Unit test framework.
Added:
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest1_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4_ServerResponse.expected
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5_ServerResponse.expected
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest1Client.cpp
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest2Client.cpp
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest4Client.cpp
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest5Client.cpp
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5.cpp.out
webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest1.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest2.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest4.xml
webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest5.xml
webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest1Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest1Client.cpp?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest1Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest1Client.cpp Wed Jan 18 02:16:34 2006
@@ -25,6 +25,7 @@
*/
#include <string>
+#include <iostream>
using namespace std;
#include "InteropTestPortType.hpp"
@@ -41,13 +42,15 @@
char endpoint[256];
const char *server = "localhost";
const char *port = "80";
-
+
//endpoint for Axis CPP sample
sprintf(endpoint, "http://%s:%s/axis/base", server, port);
- // Set the endpoint from command line argument if set
- if (argc > 1)
- strcpy(endpoint, argv[1]);
+ // Set the endpoint from command line argument if set
+ if (argc > 1)
+ {
+ strcpy(endpoint, argv[1]);
+ }
/*Set for HTTP transport */
InteropTestPortType ws(endpoint, APTHTTP1_1);
@@ -55,100 +58,118 @@
//set HTTP headers
ws.setTransportProperty("Accept-Language", " da, en-gb;q=0.8, en;q=0.7");
- printf("invoking echoString...\n");
+ cout << "invoking echoString..." << endl;
//testing echoString
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
- try {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
-
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
-
- printf("Test transport property accessors\n");
- printf("First transport key = %s\n", ws.getFirstTransportPropertyKey(false));
- printf("First transport value = %s\n",
- ws.getCurrentTransportPropertyValue(false));
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
+
+ cout << "Test transport property accessors" << endl;
+ cout << "First transport key = ";
+ cout << ws.getFirstTransportPropertyKey(false) << endl;
+ cout << "First transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
//test removing HTTP headers
ws.deleteTransportProperty("Accept-Language");
//now the request should not have these removed headers
- bSuccess = false;
- iRetryIterationCount = 3;
-
- do
- {
- try
- {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
+ bSuccess = false;
+ iRetryIterationCount = 3;
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ {
+ cout << "AxisException : "<< e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "unknown exception" << endl;
+ }
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
- printf("HTTP Header test end\n");
+ cout << "HTTP Header test end" << endl;
return 0;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest2Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest2Client.cpp?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest2Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest2Client.cpp Wed Jan 18 02:16:34 2006
@@ -25,6 +25,7 @@
*/
#include <string>
+#include <iostream>
using namespace std;
#include "InteropTestPortType.hpp"
@@ -40,16 +41,17 @@
char endpoint[256];
const char *server = "localhost";
const char *port = "80";
-
+
//endpoint for Axis CPP sample
sprintf(endpoint, "http://%s:%s/axis/base", server, port);
-
- // Set the endpoint from command line argument if set
- if (argc > 1)
- strcpy(endpoint, argv[1]);
-
- /*Set for HTTP transport */
+ // Set the endpoint from command line argument if set
+ if (argc > 1)
+ {
+ strcpy(endpoint, argv[1]);
+ }
+
+ /*Set for HTTP transport */
InteropTestPortType ws(endpoint, APTHTTP1_1);
//set HTTP headers
@@ -58,64 +60,77 @@
ws.setTransportProperty("Accept-Language", "lang3");
ws.setTransportProperty("Date", "Sat, 26 Jun 2004 13:32:19 GMT");
- printf("invoking echoString...\n");
+ cout << "invoking echoString..." << endl;
//testing echoString
- bool bSuccess = false;
- int iRetryIterationCount = 3;
-
- do
- {
- try {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
-
- printf("Test transport property accessors\n");
- printf("First transport key = %s\n", ws.getFirstTransportPropertyKey());
- printf("First transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
+
+ cout << "Test transport property accessors" << endl;
+ cout << "First transport key = ";
+ cout << ws.getFirstTransportPropertyKey(false) << endl;
+ cout << "First transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
const char *key = NULL;
int count = 1;
- while (key = ws.getNextTransportPropertyKey())
+ while (key = ws.getNextTransportPropertyKey(false))
{
- printf("Next transport key = %s\n", key);
- printf("Next transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ cout << "Next transport key = " << key << endl;
+ cout << "Next transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
count++;
//test removal of last transport property
if (count == 4)
- ws.deleteCurrentTransportProperty();
+ {
+ ws.deleteCurrentTransportProperty(false);
+ }
}
//test removing HTTP headers
@@ -123,49 +138,57 @@
ws.deleteTransportProperty("Date");
//now the request should not have these removed headers
- bSuccess = false;
- iRetryIterationCount = 3;
+ bSuccess = false;
+ iRetryIterationCount = 3;
- do
- {
- try
- {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
-
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
- printf("HTTP Header test end\n");
+ cout << "HTTP Header test end" << endl;
return 0;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest4Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest4Client.cpp?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest4Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest4Client.cpp Wed Jan 18 02:16:34 2006
@@ -25,6 +25,7 @@
*/
#include <string>
+#include <iostream>
using namespace std;
#include "InteropTestPortType.hpp"
@@ -40,16 +41,17 @@
char endpoint[256];
const char *server = "localhost";
const char *port = "80";
-
+
//endpoint for Axis CPP sample
sprintf(endpoint, "http://%s:%s/axis/base", server, port);
-
- // Set the endpoint from command line argument if set
- if (argc > 1)
- strcpy(endpoint, argv[1]);
-
- /*Set for HTTP transport */
+ // Set the endpoint from command line argument if set
+ if (argc > 1)
+ {
+ strcpy(endpoint, argv[1]);
+ }
+
+ /*Set for HTTP transport */
InteropTestPortType ws(endpoint, APTHTTP1_1);
//set HTTP headers
@@ -58,113 +60,133 @@
ws.setTransportProperty("Accept-Language", "lang2");
ws.setTransportProperty("Accept-Language", "lang2");
- printf("invoking echoString...\n");
+ cout << "invoking echoString..." << endl;
//testing echoString
- bool bSuccess = false;
- int iRetryIterationCount = 3;
-
- do
- {
- try {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
-
- printf("Test transport property accessors\n");
- printf("First transport key = %s\n", ws.getFirstTransportPropertyKey());
- printf("First transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
+
+ cout << "Test transport property accessors" << endl;
+ cout << "First transport key = ";
+ cout << ws.getFirstTransportPropertyKey(false) << endl;
+ cout << "First transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
const char *key = NULL;
int count = 1;
- while (key = ws.getNextTransportPropertyKey())
+ while (key = ws.getNextTransportPropertyKey(false))
{
- printf("Next transport key = %s\n", key);
- printf("Next transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ cout << "Next transport key = " << key << endl;
+ cout << "Next transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
count++;
//test removal of last transport property
if (count == 4)
- ws.deleteCurrentTransportProperty();
+ {
+ ws.deleteCurrentTransportProperty(false);
+ }
}
//test removing HTTP headers
ws.deleteTransportProperty("Accept-Language", 1);
//now the request should not have these removed headers
- bSuccess = false;
- iRetryIterationCount = 3;
+ bSuccess = false;
+ iRetryIterationCount = 3;
- do
- {
- try
+ do
{
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
-
- bSuccess = true;
- }
- catch(AxisException& e)
- {
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed " << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
-
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
- printf("HTTP Header test end\n");
+ cout << "HTTP Header test end" << endl;
return 0;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest5Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest5Client.cpp?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest5Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest5Client.cpp Wed Jan 18 02:16:34 2006
@@ -25,6 +25,7 @@
*/
#include <string>
+#include <iostream>
using namespace std;
#include "InteropTestPortType.hpp"
@@ -40,76 +41,87 @@
char endpoint[256];
const char *server = "localhost";
const char *port = "80";
-
- //endpoint for Axis CPP sample
+
+ //endpoint for Axis CPP sample
sprintf(endpoint, "http://%s:%s/axis/base", server, port);
-
- // Set the endpoint from command line argument if set
- if (argc > 1)
- strcpy(endpoint, argv[1]);
-
-
-
- /*Set for HTTP transport */
+
+ // Set the endpoint from command line argument if set
+ if (argc > 1)
+ {
+ strcpy(endpoint, argv[1]);
+ }
+
+ /*Set for HTTP transport */
InteropTestPortType ws(endpoint, APTHTTP1_1);
//set HTTP headers
ws.setTransportProperty("SOAPAction", "InteropBase#echoString");
- printf("invoking echoString...\n");
+ cout << "invoking echoString..." << endl;
//testing echoString
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
- try {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
-
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
-
- printf("Test transport property accessors\n");
- printf("First transport key = %s\n", ws.getFirstTransportPropertyKey());
- printf("First transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexpected exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
+
+ cout << "Test transport property accessors" << endl;
+ cout << "First transport key = ";
+ cout << ws.getFirstTransportPropertyKey(false) << endl;
+ cout << "First transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
const char *key = NULL;
int count = 1;
- while (key = ws.getNextTransportPropertyKey())
+ while (key = ws.getNextTransportPropertyKey(false))
{
- printf("Next transport key = %s\n", key);
- printf("Next transport value = %s\n",
- ws.getCurrentTransportPropertyValue());
+ cout << "Next transport key = " << key << endl;
+ cout <<"Next transport value = ";
+ cout << ws.getCurrentTransportPropertyValue(false) << endl;
count++;
}
@@ -117,49 +129,58 @@
ws.deleteTransportProperty("SOAPAction");
//now the request should not have these removed headers
- bSuccess = false;
- iRetryIterationCount = 3;
+ bSuccess = false;
+ iRetryIterationCount = 3;
- do
- {
- try
- {
- if (0 == strcmp(ws.echoString("hello world"), "hello world"))
- printf("successful\n");
- else
- printf("failed\n");
-
- bSuccess = true;
- }
- catch(AxisException& e)
+ do
{
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ try
+ {
+ if (0 == strcmp(ws.echoString("hello world"), "hello world"))
+ {
+ cout << "successful" << endl;
+ }
+ else
+ {
+ cout << "failed" << endl;
+ }
+
+ bSuccess = true;
+ }
+ catch(AxisException& e)
+ {
+ bool bSilent = false;
+
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- printf("%s\n", e.what());
- }
- }
- catch(...)
- {
- printf("Unknown exception\n");
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ {
+ cout << "AxisException : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unexcepted exception : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception" << endl;
+ }
+
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
- printf("HTTP Header test end\n");
+ cout << "HTTP Header test end" << endl;
return 0;
}
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest1_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest1_ServerResponse.expected?rev=370105&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest1_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest1_ServerResponse.expected Wed Jan 18 02:16:34 2006
@@ -0,0 +1,13 @@
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:13:42 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:13:43 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>
\ No newline at end of file
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2.cpp.out
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2.cpp.out?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2.cpp.out (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2.cpp.out Wed Jan 18 02:16:34 2006
@@ -9,5 +9,7 @@
Next transport value = lang3
Next transport key = Date
Next transport value = Sat, 26 Jun 2004 13:32:19 GMT
+Next transport key = Content-Length
+Next transport value = 405
successful
HTTP Header test end
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2_ServerResponse.expected?rev=370105&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest2_ServerResponse.expected Wed Jan 18 02:16:34 2006
@@ -0,0 +1,13 @@
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:01 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:01 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>
\ No newline at end of file
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4.cpp.out
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4.cpp.out?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4.cpp.out (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4.cpp.out Wed Jan 18 02:16:34 2006
@@ -9,5 +9,7 @@
Next transport value = lang2
Next transport key = Accept-Language
Next transport value = lang2
+Next transport key = Content-Length
+Next transport value = 405
successful
HTTP Header test end
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4_ServerResponse.expected?rev=370105&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest4_ServerResponse.expected Wed Jan 18 02:16:34 2006
@@ -0,0 +1,13 @@
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:14 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:14 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>
\ No newline at end of file
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5.cpp.out
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5.cpp.out?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5.cpp.out (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5.cpp.out Wed Jan 18 02:16:34 2006
@@ -2,6 +2,8 @@
successful
Test transport property accessors
First transport key = SOAPAction
-First transport value = InteropBase#echoString
+First transport value = "InteropBase#echoString"
+Next transport key = Content-Length
+Next transport value = 405
successful
HTTP Header test end
Added: webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5_ServerResponse.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5_ServerResponse.expected?rev=370105&view=auto
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5_ServerResponse.expected (added)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/RpcHttpHeaderTest5_ServerResponse.expected Wed Jan 18 02:16:34 2006
@@ -0,0 +1,13 @@
+HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:21 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>HTTP/1.1 200 OK
+Content-Type: text/xml; charset=utf-8
+Content-Language: en-US
+Content-Length: 568
+Date: Wed, 18 Jan 2006 04:14:22 GMT
+
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/><soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><p201:echoStringResponse xmlns:p201="http://soapinterop.org/"><return xsi:type="xsd:string">hello world</return></p201:echoStringResponse></soapenv:Body></soapenv:Envelope>
\ No newline at end of file
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest1.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest1.xml?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest1.xml (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest1.xml Wed Jan 18 02:16:34 2006
@@ -8,6 +8,7 @@
<output>
RpcHttpHeaderTest1.cpp.out
</output>
+ <serverResponse>RpcHttpHeaderTest1_ServerResponse.expected</serverResponse>
</expected>
<endpoint>http://localhost:80/axis/InteropBase</endpoint>
</test>
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest2.xml?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest2.xml (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest2.xml Wed Jan 18 02:16:34 2006
@@ -8,6 +8,7 @@
<output>
RpcHttpHeaderTest2.cpp.out
</output>
+ <serverResponse>RpcHttpHeaderTest2_ServerResponse.expected</serverResponse>
</expected>
<endpoint>http://localhost:80/axis/InteropBase</endpoint>
</test>
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest4.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest4.xml?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest4.xml (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest4.xml Wed Jan 18 02:16:34 2006
@@ -8,6 +8,7 @@
<output>
RpcHttpHeaderTest4.cpp.out
</output>
+ <serverResponse>RpcHttpHeaderTest4_ServerResponse.expected</serverResponse>
</expected>
<endpoint>http://localhost:80/axis/InteropBase</endpoint>
</test>
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest5.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest5.xml?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest5.xml (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/tests/RpcHttpHeaderTest5.xml Wed Jan 18 02:16:34 2006
@@ -8,6 +8,7 @@
<output>
RpcHttpHeaderTest5.cpp.out
</output>
+ <serverResponse>RpcHttpHeaderTest5_ServerResponse.expected</serverResponse>
</expected>
<endpoint>http://localhost:80/axis/InteropBase</endpoint>
</test>
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?rev=370105&r1=370104&r2=370105&view=diff
==============================================================================
Binary files - no diff available.