--- /dev/null
+<?php
+require_once("../lib/lib.php");
+
+ini_set("soap.wsdl_cache_enabled", "0");
+
+$soapFunctions["status"] = "status";
+global $soapFunctions;
+
+function status($status)
+{
+ $lk = new dataContainer();
+ $lk->stringpass[0] = "yes";
+ $lk->stringpass[1] = "np";
+ return $lk;
+}
+
+if(isset($_REQUEST["wsdl"])) {
+ $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
+ generateWSDL($mylocation, $soapFunctions);
+ exit(0);
+}
+
+if(isset($_REQUEST["xsd"])) {
+ $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
+ generateXSD($mylocation, $soapFunctions);
+ exit(0);
+}
+
+if($_SERVER["REQUEST_METHOD"] != "POST") {
+ $mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
+ generateWSDL($mylocation, $soapFunctions);
+ exit(0);
+}
+
+function generateWSDL($location, $functions)
+{
+ header("Content-type: text/xml");
+ $wsdl = sp_generateWSDL($location, $functions);
+ echo $wsdl;
+}
+
+function generateXSD($location, $functions)
+{
+ header("Content-type: text/xml");
+ $wsdl = sp_generateXSD($location, $functions);
+ echo $wsdl;
+}
+
+$mylocation = "https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
+$s = new SoapServer("$mylocation?wsdl");
+
+foreach($soapFunctions as $function) {
+ $s->addFunction($function);
+}
+
+$s->handle();
+
+
+?>
\ No newline at end of file