0
我尽量让肥皂服务用symfony 2,作为一个结果,我有这样的:symfony的2 +肥皂
<trace>at Symfony\Component\HttpKernel\Debug\ErrorHandler->handle('2', 'SoapFault::SoapFault() expects at least 2 parameters, 1 given', '/var/www/Symfony/src/Acme/TxBundle/Controller/DefaultController.php', '39', array('ref' => '333', 'stockinfos' => null)) in line</trace>
我的功能:
public function getInformationStockAction($ref)
{
$stockinfos = $this->container->get('doctrine')->getRepository('TxBundle:LlxProduct')->findOneBy(array('ref'=>$ref))
;
if (!$stockinfos)
{
throw new \SoapFault(sprintf('No warehouse found for the given productRef : "%s" ', $ref));
}
return $this->container->get('besimple.soap.response')->setReturnValue($stockinfos);
}
有人有理念? THX