wsdl definition can now be retrieved; aligned controller method and route naming;

This commit is contained in:
Christian Kerl
2011-04-08 00:46:58 +02:00
parent a4d69aedbc
commit fa07646e3a
4 changed files with 49 additions and 21 deletions

View File

@ -77,7 +77,7 @@ class SoapWebServiceController extends ContainerAware
return $this->soapResponse;
}
public function handle($webservice)
public function call($webservice)
{
$webServiceContext = $this->container->get('webservice.context.' . $webservice);
@ -106,16 +106,19 @@ class SoapWebServiceController extends ContainerAware
if($request->query->has('WSDL'))
{
$response = new Response(file_get_contents($webServiceContext->getWsdlFile()));
$response->headers->set('Content-Type', 'application/wsdl+xml');
$endpoint = $this->container->get('router')->generate('_webservice_call', array('webservice' => $webservice), true);
return $response;
$response = new Response($webServiceContext->getWsdlFileContent($endpoint));
$response->headers->set('Content-Type', 'text/plain');
}
else
{
$response = new Response('woho');
// dump pretty definition
// return $this->container->get('templating')->renderView('');
}
return $response;
}
/**