我正在从 try...catch 块内拨打肥皂电话,
$request->l_Request->Year = $year;
// $request->l_Request->Period = $period;
try {
/**
*
* perform getMake request
* @var stdClass
*/
$response = $client->getSeries($request);
$series = $response->getSeriesResult->Lookup_Struc;
return $series;
} catch (SoapFault $exception) {
/**
* log exception on soap request
*/
$this->getLogger()->log($exception->getMessage(), Zend_Log::ERR);
$this->getLogger()->log($exception->getTraceAsString(), Zend_Log::INFO);
return false;
} catch (Exception $exception) {
/**
* log exception on soap request
*/
$this->getLogger()->log($exception->getMessage(), Zend_Log::ERR);
$this->getLogger()->log($exception->getTraceAsString(), Zend_Log::INFO);
return false;
}
这是我的输出/错误的样子
( ! ) 致命错误:SOAP-ERROR: Encoding: object has no 'Period' property in C:\wamp\www\FHH\library\Zend\Soap\Client.php on line 1121
但是我无法使用 try catch 捕获肥皂错误,是否有特殊的方法来处理这个问题。