Replaced QName->getNamespace() by ServiceDefinition->getNamespace() for headers

This commit is contained in:
Francis Besset
2011-09-01 19:40:44 +02:00
parent 57b35c5e62
commit 958efd3431
3 changed files with 8 additions and 8 deletions

View File

@ -22,6 +22,8 @@ Controller
public function helloAction(array $names)
{
$soapHeaders = $this->container->get('request')->getSoapHeaders();
// You can use '1234' !== (string) $soapHeaders->get('api_key')
if (!$soapHeaders->has('api_key') || '1234' !== $soapHeaders->get('api_key')->getData()) {
throw new \SoapFault("INVALID_API_KEY", "The api_key is invalid.");
}