Added besimple.soap.response service
It is highly recommended not to instantiate BeSimple\SoapBundle\Soap\SoapResponse but to use the service besimple.soap.response Before: public function helloAction($name) { return new SoapResponse("Hello ".$name); } After: public function helloAction($name) { return $this ->container ->get('besimple.soap.response') ->setReturnValue("Hello ".$name) ; }
This commit is contained in:
@ -9,7 +9,6 @@ Controller
|
||||
namespace My\App\Controller;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
use BeSimple\SoapBundle\Soap\SoapResponse;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
|
||||
class DemoController extends ContainerAware
|
||||
@ -21,6 +20,6 @@ Controller
|
||||
*/
|
||||
public function helloAction(array $names)
|
||||
{
|
||||
return new SoapResponse("Hello ".implode(', ', $names));
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue("Hello ".implode(', ', $names));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user