【发布时间】:2011-01-12 00:05:31
【问题描述】:
在请求一个soap web 服务操作时,如何捕获我的自定义soap 错误ProductoInexistente?我的代码如下,但它不起作用:
$_WSDL_URI = 'http://joaquinlrobles.redirectme.net:8080/Pelopincho/PelopinchoService?WSDL';
$ws = new Zend_Soap_Client($_WSDL_URI, array('soap_version' => SOAP_1_1));
try {
$resultado = $ws->getStockProducto(array('idProducto' => $idProducto));
$this->view->resultado = $resultado->result;
}
catch (ProductoInexistente $ex) {
$this->view->resultado = 'Producto Inexistente';
}
谢谢!
【问题讨论】:
标签: php web-services zend-framework soap exception-handling