Soap ckWebServicePlugin中的复杂类型参数数组为Null

Soap ckWebServicePlugin中的复杂类型参数数组为Null,soap,symfony1,symfony-1.4,symfony-plugins,Soap,Symfony1,Symfony 1.4,Symfony Plugins,我正在用symfony的ckWebServicePlugin制作一个Web服务。 我设法用一个简单类型的参数和一个复杂类型的返回来创建一个方法,它工作得很好,但是当我试图在参数中获取一个复杂类型的数组时,它似乎返回了一个空值 /api/actions.class.php 这是我的soap客户端 $test = array(array('request_id' => 1, 'statut' => 3), array('request_id' => 2, 'statut' =>

我正在用symfony的ckWebServicePlugin制作一个Web服务。 我设法用一个简单类型的参数和一个复杂类型的返回来创建一个方法,它工作得很好,但是当我试图在参数中获取一个复杂类型的数组时,它似乎返回了一个空值

/api/actions.class.php

这是我的soap客户端

$test = array(array('request_id' => 1, 'statut' => 3), array('request_id' => 2, 'statut' => 3),);
$result = $proxy->updateRequests($test);
这是我的短型

class RequestShort {
/**
* @var int
*/
public $request_id;
/**
* @var int
*/
public $statut;

public function __construct($request_id, $statut)
{
    $this->request_id = $request_id;
    $this->statut = $statut;
}
}
最后是我的app.yml

soap:
  # enable the `ckSoapParameterFilter`
  enable_soap_parameter: on
  ck_web_service_plugin:
    # the location of your wsdl file
    wsdl: %SF_WEB_DIR%/api.wsdl 
    # the class that will be registered as handler for webservice requests
    handler: ApiHandler
    soap_options:
      classmap:
        # mapping of wsdl types to PHP types
        RequestShort: RequestShort
        RequestShortArray: ckGenericArray
下面的代码怎么什么也不返回?

$res = $request->getParameter('$arrRequests');
$this->result = $res;
在我看来:

$res=$request->getParameter(“$arrRequests”);
$this->result=$res;
返回sfView::成功;
您拼错了
getParameter()
函数的参数

也许应该是这样的:

$res=$request->getParameterHolder()->getAll();
$this->result=$res;
返回sfView::成功;

不要忘了做一个
symfony cc&&symfony webservice:generate wsdl…
,以防万一。

这是因为您得到了错误的参数

$arrRequests != arrRequests
ckSoapParameterFilter已经将@param$arrRequests转换为没有$的简单参数,因此您不需要它

应该是:

public function executeUpdateRequests(sfWebRequest $request)
{
   $res = $request->getParameter('arrRequests');
   $this->result = $res;
   return sfView::SUCCESS;
}
public function executeUpdateRequests(sfWebRequest $request)
{
   $res = $request->getParameter('arrRequests');
   $this->result = $res;
   return sfView::SUCCESS;
}