handlerRequest(); $uri = $MIOLO->getConf('home.url'); echo "Webservices called from $client at $time\n"; echo "Requested Data:\n"; echo "Module: $currentModule, Class: $class, "; $wsdlFile = "html/files/wsdl/$class.wsdl"; //$wsdlFile = "/modules/gnuteca3/webservices/wsdl/$class.wsdl"; $wsdlPath = $MIOLO->getModulePath( $currentModule, $wsdlFile ); $wsdl = NULL; if ( file_exists($wsdlPath) ) { $wsdl = $wsdlPath; } file_put_contents('/tmp/pathw', $wsdl, FILE_APPEND); //Instanciate a new soapserver $server = new SoapServer( $wsdl, array( 'uri' => $uri ) ); $wsdlFile = "/webservices/wsdl/$class.wsdl"; $wsdlPath = $MIOLO->getModulePath( $currentModule, $wsdlFile ); $wsdl = NULL; if ( file_exists($wsdlPath) ) { $wsdl = $wsdlPath; } //Instanciate a new soapserver $server = new SoapServer( $wsdl, array( 'uri' => $uri ) ); $file = "/webservices/$class.class.php"; $path = $MIOLO->getModulePath( $currentModule, $file ); if ( file_exists($path) ) { include_once($path); $server->setClass($class); $funcs = $server->getFunctions(); echo "Methods: "; foreach($funcs as $f) { echo "$f, "; } echo "\n"; $out = ob_get_contents(); ob_end_clean(); $server->handle(); } else { echo "\nERROR! File not found: $path \n"; $out = ob_get_contents(); ob_end_clean(); $server->fault('171', 'Sorry, webservices not found!'); } ?>