Esempio n. 1
0
<p>
<i>if you know of any other servers that support interop tests, please send a note to
   <a href='mailto:xmlrpc-epi-devel@lists.sourceforge.net'>xmlrpc-epi-devel@lists.sourceforge.net</a>
   and we will add it to the list</i>.
END;
}
// some code which determines if we are in form display or response mode.
$server_list = get_interop_servers();
$server = get_server_from_user($server_list);
if ($server) {
    $debug = $GLOBALS['HTTP_GET_VARS']['debug'] || $GLOBALS['HTTP_GET_VARS']['start_debug'];
    $output['version'] = $GLOBALS['HTTP_GET_VARS']['version'];
    if ($server) {
        $title = $server['title'];
        echo "<h2><center>Results for {$title}</center></h2>";
        ident($server, $debug, $output);
        if ($GLOBALS['HTTP_GET_VARS']['stress'] == 1) {
            run_stress_tests($server, $debug, $output);
        } else {
            run_easy_tests($server, $debug, $output);
        }
    } else {
        echo "<h3>invalid option</h3>";
    }
} else {
    print_html_form($server_list);
}
/* Interop tests description:

interopEchoTests.echoString (inputString) -- Sends a random string to the server, and checks that the
response is a string whose value is the same as the string that was sent.
if (isset($_GET["registerby"])) {
    REGISTER_BY();
    exit;
}
if (isset($_GET["GetYourUUID"])) {
    GetYourUUID();
    exit;
}
if (isset($_GET["wakeup"])) {
    wakeup();
    exit;
}
if (!isset($_GET["ident"])) {
    die;
}
if (!ident()) {
    writelogs_meta("Identification failed", __FUNCTION__, __FILE__, __LINE__);
    die;
}
if (isset($_GET["snapshot"])) {
    receive_to_download_snapshot();
    exit;
}
if (isset($_POST["PUSH_FILE_CMD"])) {
    receive_generic_file();
    exit;
}
if (isset($_GET["removeorder"])) {
    receive_removeorder();
    exit;
}