<?php /** * @file query.php * @brief REST interface for Query * * * @version $Id: $ */ require_once 'DES_ini.php'; // $des_ws = new DES_WS(); $des_ws = new DES_WS(); $result = $des_ws->LongQuery($_GET); // header('Content-Type: text/xml'); if ($result['ID'] != null) { echo '<jobid>' . $result['ID'] . '</jobid>'; } elseif ($result['error'] != null) { echo '<error>' . $result['error'] . '</error>'; } else { echo '<error> unknown error </error>'; } ?>
<?php /** * @file plot.php * @brief REST interface for Query * * * @version $Id: $ */ require_once 'DES_ini.php'; $des_ws = new DES_WS(); $result = $des_ws->LongTimeQuery($_GET); // header('Content-Type: text/xml'); if ($result['ID'] != null) { echo '<jobid>' . $result['ID'] . '</jobid>'; } elseif ($result['error'] != null) { echo '<error>' . $result['error'] . '</error>'; } else { echo '<error> unknown error </error>'; } ?>
<?php /** * @file jobStatus.php * @brief DES REST interface to job status services * * @version $Id: $ */ require_once 'DES_ini.php'; $des_ws = new DES_WS(); // header('Content-Type: text/xml'); switch ($_GET['MODE']) { case 'phase': $result = $des_ws->GetStatus($_GET); echo '<Status><ID>' . $result["Status"]["ID"] . '</ID>' . '<status>' . $result["Status"]["status"] . '</status>' . '<description>' . $result["Status"]["description"] . '</description></Status>'; break; case 'abort': $result = $des_ws->Abort($_GET); echo '<Status><ID>' . $result["Status"]["ID"] . '</ID>' . '<status>' . $result["Status"]["status"] . '</status>' . '<description>' . $result["Status"]["description"] . '</description></Status>'; break; case 'result': $result = $des_ws->GetResult($_GET); echo '<ResultInfo><ID>' . $result["ResultInfo"]["ID"] . '</ID>' . '<resultURI>' . $result["ResultInfo"]["resultURI"] . '</resultURI>' . '<fileInfo>' . $result["ResultInfo"]["fileInfo"] . '</fileInfo> ' . '<status>' . $result["ResultInfo"]["status"] . '</status> ' . '<description>' . $result["ResultInfo"]["description"] . '</description></ResultInfo>'; break; default: echo '<error> no such service</error>'; }
<?php /* $Id: LongRunningQueryService.php, v 0.1 2011/07/12 natasha */ /** * @file LongRunningQueryService.php * @brief Long Running Query Rest Service for Helio WebServices * * @date 14.01.2011 * @version 0.1 */ require_once 'HelioMDESserverWeb_ini.php'; $des_ws = new DES_WS(); $MODE = ''; if (urldecode($_GET['MODE'])) { $MODE = urldecode($_GET['MODE']); } switch ($MODE) { case 'phase': $ID = urldecode($_GET['ID']); $result = $des_ws->GetStatus($ID); echo '<Status><ID>' . $result["Status"]["ID"] . '</ID> ' . '<status>' . $result["Status"]["status"] . '</status> ' . '<description>' . $result["Status"]["description"] . '</description></Status>'; break; case 'result': $ID = urldecode($_GET['ID']); $result = $des_ws->GetResult($ID); echo '<ResultInfo><ID>' . $result["ResultInfo"]["ID"] . '</ID> ' . '<resultURI>' . $result["ResultInfo"]["resultURI"] . '</resultURI> ' . '<fileInfo>' . $result["ResultInfo"]["fileInfo"] . '</fileInfo> ' . '<status>' . $result["ResultInfo"]["status"] . '</status> ' . '<description>' . $result["ResultInfo"]["description"] . '</description></ResultInfo>'; break; default: $start = explode(',', $_GET['STARTTIME']); $stop = explode(',', $_GET['ENDTIME']); $missions = explode(",", $_GET['FROM']);