Fixed issue #3

This commit is contained in:
Francis Besset 2011-08-11 00:42:14 +02:00
parent ea003a1224
commit b0efd027d5
1 changed files with 8 additions and 2 deletions

View File

@ -111,7 +111,13 @@ class SoapWebServiceController extends ContainerAware
);
// forward to controller
try {
$response = $this->container->get('http_kernel')->handle($this->soapRequest, HttpKernelInterface::SUB_REQUEST, false);
} catch (\SoapFault $e) {
$this->soapResponse = new Response(null, 500);
throw $e;
}
$this->soapResponse = $this->checkResponse($response);
@ -139,7 +145,7 @@ class SoapWebServiceController extends ContainerAware
*/
protected function checkResponse(Response $response)
{
if (null === $response || !$response instanceof SoapResponse) {
if (!$response instanceof SoapResponse) {
throw new \InvalidArgumentException();
}