📄 interop_test.cpp
字号:
/**
* List of toolkit supported...
*/
ToolKitInfo tkList[] =
{
#if 1
ToolKitInfo(
"SOAP:Lite",
"http://services.soaplite.com/interop.cgi",
"urn:soapinterop",
"http://soapinterop.org/",
"http://services.soaplite.com/interop.wsdl",
"",
false
),
ToolKitInfo(
"Frontier (Userland)",
"http://www.soapware.org:80/xmethodsInterop",
"/xmethodsInterop",
"urn:xmethodsInterop",
"",
"",
false
),
ToolKitInfo(
"Kafka XSLT Interop Service",
"http://www.vbxml.com/soapworkshop/services/kafka10/services/endpoint.asp?service=ilab",
"urn:soapinterop",
"http://soapinterop.org/",
"http://www.vbxml.com/soapworkshop/services/kafka10/services/endpoint.asp?service=ilab&type=wsdl",
"",
false
),
ToolKitInfo(
"Phalanx",
"http://www.phalanxsys.com/interop/listener.asp",
"urn:soapinterop",
"http://soapinterop.org/",
"http://www.phalanxsys.com/interop/interop.wsdl",
"",
false
),
ToolKitInfo(
"SoapRMI",
"http://rainier.extreme.indiana.edu:1568",
"urn:soapinterop",
"http://soapinterop.org/",
"",
"",
false
),
ToolKitInfo(
"4S4C - pocketSOAP.com",
"http://soap.4s4c.com/ilab/soap.asp",
"urn:soapinterop",
"http://soapinterop.org/",
"http://soap.4s4c.com/ilab/soap.asp?WSDL",
"",
false
),
ToolKitInfo(
"SQLData SOAP Server",
"http://www.soapclient.com/interop/sqldatainterop.wsdl",
"/soapinterop",
"http://tempuri.org/message/",
"http://www.SoapClient.com/interop/SQLDataInterop.wsdl",
"",
false
),
ToolKitInfo(
"Apache 2.1",
"http://nagoya.apache.org:5089/soap/servlet/rpcrouter",
"urn:soapinterop",
"http://soapinterop.org/",
"http://www.xmethods.net/sd/interop/ApacheInterop11.wsdl",
"",
false
),
ToolKitInfo(
WHITE_MESA,
"http://www.whitemesa.net/interop",
"urn:soapinterop",
"http://soapinterop.org/",
"http://www.whitemesa.net/wsdl/interop.wsdl",
"",
false
),
ToolKitInfo(
"EasySoap++",
"http://www.xmethods.net/c/easysoap.cgi",
"urn:soapinterop",
"http://soapinterop.org/",
"http://easysoap.sourceforge.net/interop.wsdl",
"",
false ),
ToolKitInfo(
"eSoap - Embedded SOAP Toolkit( CGI )",
"http://www.connecttel.com/cgi-bin/esoapserver.cgi",
"http://soapinterop.org/",
"http://soapinterop.org/",
"",
"",
false
),
#endif
#if 1
ToolKitInfo(
"MS SOAP Toolkit 2.0",
"http://131.107.72.13/stk/InteropTyped.wsdl",
"urn:soapinterop",
"http://soapinterop.org/",
"http://131.107.72.13/stk/InteropTyped.wsdl",
"",
false
),
ToolKitInfo(
"MS .NET Remoting -- 1999 untyped.",
"http://131.107.72.13/DotNetRemoting1999/InteropService.soap",
"urn:soapinterop",
"http://soapinterop.org/",
"http://131.107.72.13/DotNetRemoting1999/InteropService.WSDL",
"",
false
),
ToolKitInfo(
MS_NET_REMOTING_TYPED,
"http://131.107.72.13/DotNetRemoting2001Typed/InteropService.soap",
"urn:soapinterop",
"http://soapinterop.org/",
"http://131.107.72.13/DotNetRemoting2001Typed/InteropService.WSDL",
"",
false
),
ToolKitInfo(
MS_NET_REMOTING,
"http://131.107.72.13/DotNetRemoting1999Typed/InteropService.soap",
"urn:soapinterop",
"http://soapinterop.org/",
"http://131.107.72.13/DotNetRemoting1999Typed/InteropService.WSDL",
"",
false
),
#endif
#if 1
ToolKitInfo(
MS_NET_BETA2,
"http://131.107.72.13/test/typed.asmx",
"http://soapinterop.org/",
"http://soapinterop.org/",
"http://131.107.72.13/test/typed.asmx?WSDL",
"",
true
),
ToolKitInfo(
"SOAP.py 0.7 (actzero.com)",
"http://208.177.157.221:9595/xmethodsInterop",
"urn:soapinterop",
"http://soapinterop.org/",
"",
"",
false
),
ToolKitInfo(
"SOAPx4 - SOAP for PHP",
"http://dietrich.ganx4.com/soapx4/soap.php",
"urn:soapinterop",
"http://soapinterop.org/",
"",
"",
false
),
ToolKitInfo(
"GLUE",
"http://209.61.190.164:8004/glue/http://soapinterop.org/",
"urn:soapinterop",
"http://soapinterop.org/",
"http://209.61.190.164:8004/glue/http://soapinterop.org/.wsdl",
"",
false
),
#endif
#if 1
ToolKitInfo(
"ActiveState",
"http://soaptest.activestate.com:8080/PerlEx/soap.plex",
"urn:soapinterop",
"http://soapinterop.org/",
"http://soaptest.activestate.com:8080/SoapBuildersTest.wsdl",
"",
false
),
ToolKitInfo(
"HP SOAP",
"http://soap.bluestone.com:80/scripts/SaISAPI.dll/SaServletEngine.class/hp-soap/soap/rpc/interop/EchoService",
"urn:soapinterop",
"http://soapinterop.org/",
"http://soap.bluestone.com:80/interop/EchoService/EchoService.wsdl",
"",
false
),
ToolKitInfo(
"Idoox WASP",
"http://soap.idoox.net:7080/soap/servlet/soap/ilab",
"urn:soapinterop",
"http://soapinterop.org/",
"http://soap.idoox.net:7080/soap/services/ilab.wsdl",
"",
false
),
ToolKitInfo(
"MS ATL Server",
"http://4.34.185.52/ilab/ilab.dll?Handler=Default",
"urn:soapinterop",
"http://soapinterop.org/",
"http://4.34.185.52/ilab/ilab.wsdl",
"",
false
),
ToolKitInfo(
"SOAP4R",
"http://www.jin.gr.jp/~nahi/Ruby/SOAP4R/SOAPBuildersInterop/",
"urn:soapinterop",
"http://soapinterop.org/",
"",
"",
false
),
ToolKitInfo(
"Zolera SOAP Infrastructure (ZSI)",
"http://63.142.188.184:7000/",
"urn:soapinterop",
"http://soapinterop.org/",
"",
"",
false
),
#endif
/*
ToolKitInfo(
"eSoap - Embedded SOAP Toolkit",
"http://localhost:8080/rpcrouter",
"http://soapinterop.org/",
"http://soapinterop.org/",
"",
"",
false
),
*/
/*
ToolKitInfo(
"eSoap - Embedded SOAP Toolkit( CGI )",
"http://www.fofoca.com/cgi-bin/esoapserver.cgi",
"http://soapinterop.org/",
"http://soapinterop.org/",
"",
"",
false
),
*/
};
const int MAX_KITS= sizeof( tkList ) / sizeof( tkList[ 0 ] );
esoap::String res_string[ MAX_KITS ][ 11 ];
bool res_table[ MAX_KITS ][ 11 ] = { false };
int i;
for( i = 0; i < MAX_KITS; i++ )
{
res_table[ i ][ 0 ] = echoString( tkList[ i ], "Hello World", res_string[ i ][ 0 ] );
res_table[ i ][ 1 ] = echoInteger( tkList[ i ], "100", res_string[ i ][ 1 ] );
res_table[ i ][ 2 ] = echoFloat( tkList[ i ], "-42.24",res_string[ i ][ 2 ] );
res_table[ i ][ 3 ] = echoVoid( tkList[ i ], "", res_string[ i ][ 3 ] );
res_table[ i ][ 4 ] = echoStringArray( tkList[ i ], "Bob", res_string[ i ][ 4 ] );
res_table[ i ][ 5 ] = echoIntegerArray( tkList[ i ], "10" , res_string[ i ][ 5 ]);
res_table[ i ][ 6 ] = echoFloatArray( tkList[ i ], "10.12", res_string[ i ][ 6 ] );
res_table[ i ][ 7 ] = echoStruct( tkList[ i ], "250", res_string[ i ][ 7 ] );
res_table[ i ][ 8 ] = echoStructArray( tkList[ i ], "250", res_string[ i ][ 8 ] );
res_table[ i ][ 9 ] = echoDate( tkList[ i ], " " , res_string[ i ][ 9 ]);
res_table[ i ][ 10 ] = echoBase64( tkList[ i ], "eSoap sending binary", res_string[ i ][ 10 ] );
}
printf( "\n\n" );
printf( "Summary of the Interop Test Suite -- eSoap 0.01\n" );
for( i = 0; i < MAX_KITS; i++ )
{
printf( "TOOLKIT: %s\n", tkList[ i ].maker.c_str() );
printf( "==================================\n" );
printf( "CALL: echoString() %s\n", res_table[ i ][ 0 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoInteger() %s\n", res_table[ i ][ 1 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoFloat() %s\n", res_table[ i ][ 2 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoVoid() %s\n", res_table[ i ][ 3 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoStringArray() %s\n", res_table[ i ][ 4 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoIntegerArray() %s\n", res_table[ i ][ 5 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoFloatArray() %s\n", res_table[ i ][ 6 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoStruct() %s\n", res_table[ i ][ 7 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoStructArray() %s\n", res_table[ i ][ 8 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoDate() %s\n", res_table[ i ][ 9 ] ? "PASSED" : "FAILED" );
printf( "CALL: echoBase64() %s\n", res_table[ i ][ 10 ] ? "PASSED" : "FAILED" );
printf( "==================================\n\n" );
}
int fails = 1;
FILE *fd = fopen( "interop_result.xml", "wt" );
fprintf( fd, "<?xml version=\"1.0\"?>\n" );
fprintf( fd, "<?xml-stylesheet type=\"text/xsl\" href=\"interop_result.xsl\"?>\n" );
fprintf( fd, "<eSoapResult>\n" );
time_t t = time( 0 );
fprintf( fd, "<timestamp>%s</timestamp>\n", ctime( &t ) );
fprintf( fd, "<esoapversion>%s ( C++ )</esoapversion>\n", ESOAP_VERSION );
for( i = 0; i < MAX_KITS; i++ )
{
fprintf( fd, "<toolkit name=\"%s\" endpoint=\"%s\" wsdl=\"%s\" namespace=\"%s\" soapaction=\"%s\" >\n",
escape_xml( tkList[ i ].maker ).c_str(), escape_xml( tkList[ i ].endpoint ).c_str(),
escape_xml( tkList[ i ].name_space ).c_str(), escape_xml( tkList[ i ].wsdl ).c_str(),
escape_xml( tkList[ i ].soapaction) .c_str() );
addMethod( fd, "echoString", fails, res_table[ i ][ 0 ] );
addMethod( fd, "echoInteger", fails, res_table[ i ][ 1 ] );
addMethod( fd, "echoFloat", fails, res_table[ i ][ 2 ] );
addMethod( fd, "echoVoid", fails, res_table[ i ][ 3 ] );
addMethod( fd, "echoStringArray", fails, res_table[ i ][ 4 ] );
addMethod( fd, "echoIntegerArray", fails, res_table[ i ][ 5 ] );
addMethod( fd, "echoFloatArray", fails, res_table[ i ][ 6 ] );
addMethod( fd, "echoStruct", fails, res_table[ i ][ 7 ] );
addMethod( fd, "echoStructArray", fails, res_table[ i ][ 8 ] );
addMethod( fd, "echoDate", fails, res_table[ i ][ 9 ] );
addMethod( fd, "echoBase64", fails, res_table[ i ][ 10 ] );
fprintf( fd, "</toolkit>\n\n" );
}
fails = 1;
for( i = 0; i < MAX_KITS; i++ )
{
addError( fd, res_string[ i ][ 0 ].c_str(), fails, res_table[ i ][ 0 ] );
addError( fd, res_string[ i ][ 1 ].c_str(), fails, res_table[ i ][ 1 ] );
addError( fd, res_string[ i ][ 2 ].c_str(), fails, res_table[ i ][ 2 ] );
addError( fd, res_string[ i ][ 3 ].c_str(), fails, res_table[ i ][ 3 ] );
addError( fd, res_string[ i ][ 4 ].c_str(), fails, res_table[ i ][ 4 ] );
addError( fd, res_string[ i ][ 5 ].c_str(), fails, res_table[ i ][ 5 ] );
addError( fd, res_string[ i ][ 6 ].c_str(), fails, res_table[ i ][ 6 ] );
addError( fd, res_string[ i ][ 7 ].c_str(), fails, res_table[ i ][ 7 ] );
addError( fd, res_string[ i ][ 8 ].c_str(), fails, res_table[ i ][ 8 ] );
addError( fd, res_string[ i ][ 9 ].c_str(), fails, res_table[ i ][ 9 ] );
addError( fd, res_string[ i ][ 10 ].c_str(), fails, res_table[ i ][ 10 ] );
}
fprintf( fd, "</eSoapResult>\n" );
// just to cleanup the memory...
delete esoap::ParameterFactory::setInstance( 0 );
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -