2 require_once("../lib/lib.php");
4 $soapFunctions["status"] = "status";
7 function status($status)
9 $lk = new dataContainer();
10 $lk->stringpass[0] = "yes";
11 $lk->stringpass[1] = "np";
15 if(isset($_REQUEST["wsdl"])) {
16 $mylocation = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
17 generateWSDL($mylocation, $soapFunctions);
21 if(isset($_REQUEST["xsd"])) {
22 $mylocation = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
23 generateXSD($mylocation, $soapFunctions);
27 if($_SERVER["REQUEST_METHOD"] != "POST") {
28 $mylocation = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
29 generateWSDL($mylocation, $soapFunctions);
33 function generateWSDL($location, $functions)
35 header("Content-type: text/xml");
36 $wsdl = sp_generateWSDL($location, $functions);
40 function generateXSD($location, $functions)
42 header("Content-type: text/xml");
43 $wsdl = sp_generateXSD($location, $functions);
47 $mylocation = "http://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"];
48 $s = new SoapServer("$mylocation?wsdl");
50 foreach($soapFunctions as $function) {
51 $s->addFunction($function);