2002-07-14 22:14:38 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Round 2 Interop Client Tests</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<a href="index.php">Back to Interop Index</a><br>
|
|
|
|
<p> </p>
|
|
|
|
<?php
|
2004-01-05 16:44:01 +00:00
|
|
|
require_once 'client_round2_interop.php';
|
2002-07-14 22:14:38 +00:00
|
|
|
|
|
|
|
$iop = new Interop_Client();
|
|
|
|
|
|
|
|
function endpointList($test,$sel_endpoint)
|
|
|
|
{
|
|
|
|
global $iop;
|
|
|
|
$iop->getEndpoints($test);
|
|
|
|
echo "<select name='endpoint'>\n";
|
2004-01-05 16:44:01 +00:00
|
|
|
echo "<option value=''>-- All Endpoints --</option>\n";
|
2002-07-14 22:14:38 +00:00
|
|
|
foreach ($iop->endpoints as $epname => $epinfo) {
|
|
|
|
$selected = '';
|
|
|
|
if ($sel_endpoint == $epname) $selected = ' SELECTED';
|
|
|
|
echo "<option value='$epname'$selected>$epname</option>\n";
|
|
|
|
}
|
|
|
|
echo "</select>\n";
|
|
|
|
}
|
|
|
|
function methodList($test,$sel_method)
|
|
|
|
{
|
|
|
|
global $iop;
|
2004-01-05 16:44:01 +00:00
|
|
|
global $soap_tests;
|
|
|
|
|
2002-07-14 22:14:38 +00:00
|
|
|
echo "<select name='method'>\n";
|
2004-01-05 16:44:01 +00:00
|
|
|
echo "<option value='ALL'>-- Run All Methods --</option>\n";
|
|
|
|
$prev_method = "";
|
|
|
|
foreach ($soap_tests[$test] as $x) {
|
|
|
|
$method = $x->test_name;
|
|
|
|
if ($method != $prev_method) {
|
|
|
|
$prev_method = $method;
|
|
|
|
$selected = '';
|
|
|
|
if ($sel_method == $method) $selected = ' SELECTED';
|
|
|
|
echo "<option value='$method'$selected>$method</option>\n";
|
|
|
|
}
|
2002-07-14 22:14:38 +00:00
|
|
|
}
|
|
|
|
echo "</select>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
function endpointTestForm($test, $endpoint, $method, $paramType, $useWSDL)
|
|
|
|
{
|
|
|
|
global $PHP_SELF;
|
|
|
|
if (!$test) $test = 'base';
|
|
|
|
echo "Round 2 '$test' Selected<br>\n";
|
|
|
|
echo "Select endpoint and method to run:<br>\n";
|
|
|
|
echo "<form action='$PHP_SELF' method='post'>\n";
|
|
|
|
echo "<input type='hidden' name='test' value='$test'>\n";
|
|
|
|
endpointList($test, $endpoint);
|
|
|
|
methodList($test, $method);
|
2004-01-05 16:44:01 +00:00
|
|
|
echo "<select name='paramType'>";
|
|
|
|
// echo "<option value='all'>-- All --</option>";
|
|
|
|
echo "<option value='soapval'".($paramType=='soapval'?' selected':'').">soap value</option>";
|
2002-07-14 22:14:38 +00:00
|
|
|
echo "<option value='php'".($paramType=='php'?' selected':'').">php internal type</option></select>\n";
|
2004-01-05 16:44:01 +00:00
|
|
|
echo "<select name='useWSDL'>";
|
|
|
|
// echo "<option value='all'>-- All --</option>";
|
|
|
|
echo "<option value='0'>go Direct</option>";
|
|
|
|
echo "<option value='1'".($useWSDL?' selected':'').">use WSDL</option></select>\n";
|
2002-07-14 22:14:38 +00:00
|
|
|
echo "<input type='submit' value='Go'>\n";
|
|
|
|
echo "</form><br>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
function testSelectForm($selected_test = NULL)
|
|
|
|
{
|
|
|
|
global $iop, $PHP_SELF;
|
|
|
|
echo "Select a Round 2 test case to run:<br>\n";
|
|
|
|
echo "<form action='$PHP_SELF' method='post'>\n";
|
|
|
|
echo "<select name='test'>\n";
|
|
|
|
foreach ($iop->tests as $test) {
|
|
|
|
$selected = '';
|
|
|
|
if ($selected_test == $test) $selected = ' SELECTED';
|
|
|
|
echo "<option value='$test'$selected>$test</option>\n";
|
|
|
|
}
|
|
|
|
echo "</select>\n";
|
|
|
|
echo "<input type='submit' value='Go'>\n";
|
|
|
|
echo "</form><br>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
testSelectForm($_POST['test']);
|
|
|
|
endpointTestForm($_POST['test'],$_POST['endpoint'],$_POST['method'],$_POST['paramType'],$_POST['useWSDL']);
|
|
|
|
|
|
|
|
if ($_POST['test'] && array_key_exists('endpoint', $_POST) && array_key_exists('method', $_POST)) {
|
|
|
|
// here we execute the orders
|
|
|
|
echo "<h2>Calling {$_POST['method']} at {$_POST['endpoint']}</h2>\n";
|
|
|
|
echo "NOTE: wire's are slightly modified to display better in web browsers.<br>\n";
|
2004-01-05 16:44:01 +00:00
|
|
|
|
2002-07-14 22:14:38 +00:00
|
|
|
$iop->currentTest = $_POST['test']; // see $tests above
|
|
|
|
$iop->paramType = $_POST['paramType']; // 'php' or 'soapval'
|
|
|
|
$iop->useWSDL = $_POST['useWSDL']; // 1= do wsdl tests
|
|
|
|
$iop->numServers = 0; // 0 = all
|
|
|
|
$iop->specificEndpoint = $_POST['endpoint']; // test only this endpoint
|
|
|
|
$iop->testMethod = $_POST['method']=='ALL'?'':$_POST['method']; // test only this method
|
|
|
|
$iop->skipEndpointList = array(); // endpoints to skip
|
2004-01-05 16:44:01 +00:00
|
|
|
$iop->nosave = 0; // 1= disable saving results to database
|
2002-07-14 22:14:38 +00:00
|
|
|
// debug output
|
2004-01-05 16:44:01 +00:00
|
|
|
$iop->show = 0;
|
|
|
|
$iop->debug = 0;
|
2002-07-14 22:14:38 +00:00
|
|
|
$iop->showFaults = 0; // used in result table output
|
|
|
|
echo '<pre>';
|
|
|
|
$iop->doTest(); // run a single set of tests using above options
|
|
|
|
echo '</pre>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|