2 require_once("../lib/lib.php");
4 ini_set("soap.wsdl_cache_enabled", "0");
6 $soapFunctions["status"] = "status";
9 function status($status)
11 $lk = new dataContainer();
12 $lk->stringpass[0] = "yes";
13 $lk->stringpass[1] = "np";
17 if(isset($_REQUEST["wsdl"])) {
18 $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
19 generateWSDL($mylocation, $soapFunctions);
23 if(isset($_REQUEST["xsd"])) {
24 $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
25 generateXSD($mylocation, $soapFunctions);
29 if($_SERVER["REQUEST_METHOD"] != "POST") {
30 $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
31 generateWSDL($mylocation, $soapFunctions);
35 function generateWSDL($location, $functions)
37 header("Content-type: text/xml");
38 $wsdl = sp_generateWSDL($location, $functions);
42 function generateXSD($location, $functions)
44 header("Content-type: text/xml");
45 $wsdl = sp_generateXSD($location, $functions);
49 $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
50 $s = new SoapServer("$mylocation?wsdl");
52 foreach($soapFunctions as $function) {
53 $s->addFunction($function);