I am trying to generate a WSDL for a working Soap web service using the following PHP code (the code is running in Xampp on Windows 7):
<?php
include('Zend/Soap/AutoDiscover');
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('MyService')
->setUri('http://localhost/Public_Web_Service')
->setLocation('http://localhost/Public_Web_Service/server.php')
->setServiceName('MyService');
$wsdl = $autodiscover->generate();
$wsdl->dump("C:/xampp/htdocs/file.wsdl");
?>
However, when I run the code, I run into the following error message:
Warning: include(C:\xampp\php\pear\Zend\Soap\AutoDiscover): failed to open stream: Permission denied in C:\xampp\htdocs\Public_Web_Service\zend-wsdl.php on line 2
Warning: include(): Failed opening 'Zend/Soap/AutoDiscover' for inclusion (include_path='.;C:\xampp\php\PEAR;c:\xampp\php\PEAR\Zend') in C:\xampp\htdocs\Public_Web_Service\zend-wsdl.php on line 2
Fatal error: Class 'Zend_Soap_AutoDiscover' not found in C:\xampp\htdocs\Public_Web_Service\zend-wsdl.php on line 3
I am very new to Zend and my main focus is on creating Soap web services in PHP.
Any help would be greatly appreciated.
Thanks,
John Cleaver