开发者

Working with Zend Soap classes and auto WSDL

Something very strange. WSDL file generates fine. Here is source simple class

class SoapTest
{
    /**
     * Prapapapapapapap
     * @return string Bls bls
     */
    public function getList()
    {
        return "code";
    }
}

Code for WSDL, Server, Client

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 have some prob开发者_Go百科lems with SoapServer

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

I just don't understand why? There is no extra symbol in WSDL like space or \n, all headers are specified.

Php 5.2.12 ZF 1.10.0


all problems from eAccelerator

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜