Add support for "overriden" routes

This commit is contained in:
Tim Timmermans 2019-07-11 16:55:43 +02:00 committed by BohwaZ
parent 412e7f16c9
commit cc83e1e6db
1 changed files with 7 additions and 1 deletions

View File

@ -94,9 +94,15 @@ class SoapWebServiceController implements ContainerAwareInterface
*/
public function definitionAction($webservice)
{
$routeName = $webservice . '_webservice_call';
$result = $this->container->get('router')->getRouteCollection()->get($routeName);
if ($result === null) {
$routeName = '_webservice_call';
}
$response = new Response($this->getWebServiceContext($webservice)->getWsdlFileContent(
$this->container->get('router')->generate(
'_webservice_call',
$routeName,
array('webservice' => $webservice),
UrlGeneratorInterface::ABSOLUTE_URL
)