
mohammad moradpour - 2016-04-10 09:05:27
i am using this code for gerenate wsdl but it does not work
class MyAPI {
function hello() {
return "Hello";
}
}
$server = new SoapServer(NULL, array('uri'=>'http://localhost/wsdl_sample1.php?wsdl') );
$server->setClass('MyAPI');
$server->handle();
require_once('3/src/PHPClass2WSDL.php');
$class = "Vendor\\MyAPI";
$serviceURI = "http://localhost/wsdl_sample1.php?wsdl";
$wsdlGenerator = new PHPClass2WSDL($class, $serviceURI);
$wsdlGenerator->generateWSDL(true);
$wsdlXML = $wsdlGenerator->dump();