Something very strange. WSDL file generates fine. Here is source simple class
class SoapTest
{
/**
* Prapapapapapapap
* @return string Bls bls
*/
public function getList()
{
return "code";
}
}
WSDL, Server Client için kod
if (isset($_REQUEST['wsdl'])) {
$ad = new Zend_Soap_AutoDiscover();
$ad->setClass('SoapTest');
$ad->handle();
} else if ( isset($_REQUEST['client']) ) {
$client = new Zend_Soap_Client("http://localhost/test.php");
echo $client->getList();
}
else {
$server = new Zend_Soap_Server("http://localhost/test.php?wsdl");
$server->setClass('SoapTest');
$server->handle();
}
Autogenerated WSDL SoapServer ile bazı sorunlar var
Uncaught exception 'Zend_Soap_Server_Exception' with message 'Invalid XML' in Z:\home\localhost\www\Zend\Soap\Server.php:694 Stack trace: #0 Z:\home\localhost\www\Zend\Soap\Server.php(817): Zend_Soap_Server->_setRequest('') #1 Z:\home\localhost\www\test.php(54): Zend_Soap_Server->handle() #2 {main} thrown in Z:\home\localhost\www\Zend\Soap\Server.php on line 694
Sadece neden anlamıyorum? Boşluk ya da \ n gibi WSDL hiçbir ekstra sembol var, tüm başlıkları belirtilmiştir.
Php 5.2.12 ZF 1.10.0