如何获得Zend Framework 2肥皂的参数

时间:2014-10-01 12:33:06

标签: php soap zend-framework2

    //class generator
    class SoapActions
    {
        /**
        * Return simple test
        *
        * @param Array $params
        * @return Array
        */

        public function getParams($params)
        {
            return $params;
        }
    }

    //wsdl code
    $autodiscover = new AutoDiscover();
    $autodiscover->setClass('SoapActions');
    $autodiscover->setUri('/params');
    $autodiscover->handle();

    //server code
    $server = new Server('/wsdl');
    $server->setClass('SoapActions');
    $server->setObject(new SoapActions());
    $server->handle();

    //client
    $client = new Client('/wsdl');
    $result = $client->getParams(array('opt' => 'test'));
    return $result;

在$ result中没有...

0 个答案:

没有答案