return $results->loginCmsReturn; } #============================================================================== function ShowUsage($MyPath) { printf("Uso : %s Arg#1 Arg#2\n", $MyPath); printf("donde: Arg#1 debe ser el service name del WS de negocio.\n"); printf(" Ej.: %s wsfe\n", $MyPath); } #============================================================================== ini_set("soap.wsdl_cache_enabled", "0"); if (!file_exists(CERT)) { exit("Failed to open " . CERT . "\n"); } if (!file_exists(PRIVATEKEY)) { exit("Failed to open " . PRIVATEKEY . "\n"); } if (!file_exists(WSDL)) { exit("Failed to open " . WSDL . "\n"); } if ($argc < 2) { ShowUsage($argv[0]); exit; } $SERVICE = $argv[1]; CreateTRA($SERVICE); $CMS = SignTRA(); $TA = CallWSAA($CMS); if (!file_put_contents("TA.xml", $TA)) { exit; }
<?php /** * Purge old text records from the database * * @package MediaWiki * @subpackage Maintenance * @author Rob Church <*****@*****.**> */ $options = array('purge', 'help'); require_once 'commandLine.inc'; require_once 'purgeOldText.inc'; echo "Purge Old Text\n\n"; if (@$options['help']) { ShowUsage(); } else { PurgeRedundantText(@$options['purge']); } function ShowUsage() { echo "Prunes unused text records from the database.\n\n"; echo "Usage: php purgeOldText.php [--purge]\n\n"; echo "purge : Performs the deletion\n"; echo " help : Show this usage information\n"; }
function main() { SetGlobals(); $testsFailed = 0; $testsRun = 0; $isEnterprise = false; $runApiTestsOnly = false; $file = fopen("UnitTests.log", "w"); date_default_timezone_set("GMT-0"); $str = sprintf("Run started: %s\n\n", date("D M j G:i:s T Y")); echo $str; fwrite($file, $str); if ($_SERVER['argc'] > 1 && $_SERVER['argv'][1] == "-help") { ShowUsage(); } if ($_SERVER['argc'] > 1 && $_SERVER['argv'][1] == "/enterprise") { $isEnterprise = true; } if ($_SERVER['argc'] > 1) { for ($i = 0; $i < count($_SERVER['argv']); $i++) { if ($_SERVER['argv'][$i] == "-apionly") { $runApiTestsOnly = true; } else { if ($_SERVER['argv'][$i] == "-config" && $i < count($_SERVER['argv']) - 1) { define("WEBCONFIGINI", $_SERVER['argv'][$i + 1]); } } } } if (!$file) { echo "Unable to create log file UnitTests.log"; } $testsFailed += ExecuteTest("Api", "../../TestData/ResourceService/ResourceServiceTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/ResourceService/ResourceServiceTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/DrawingService/DrawingServiceTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/DrawingService/DrawingServiceTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/FeatureService/FeatureServiceTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/FeatureService/FeatureServiceTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/SiteService/SiteServiceTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/SiteService/SiteServiceTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/MappingService/MappingServiceTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/MappingService/MappingServiceTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/ServerAdmin/ServerAdminTest.dump", $testsRun, $file, $isEnterprise); $testsFailed += ExecuteTest("Api", "../../TestData/MapLayer/MapLayerTest.dump", $testsRun, $file, $isEnterprise); $testsFailed += ExecuteTest("Api", "../../TestData/WebLayout/WebLayoutTest.dump", $testsRun, $file, $isEnterprise); if (!$runApiTestsOnly) { $testsFailed += ExecuteTest("Http", "../../TestData/Wfs/WfsTest.dump", $testsRun, $file, $isEnterprise); $testsFailed += ExecuteTest("Http", "../../TestData/Wms/WmsTest.dump", $testsRun, $file, $isEnterprise); } $testsFailed += ExecuteTest("Api", "../../TestData/Unicode/UnicodeTest.dump", $testsRun, $file, $isEnterprise); $str = sprintf("\n\nTests failed/run: %d/%d\n", $testsFailed, $testsRun); $str .= sprintf("Run ended: %s\n\n", date("D M j G:i:s T Y")); echo $str; fwrite($file, $str); if ($file) { fclose($file); } exit($testsFailed); }