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