Updated doc
This commit is contained in:
@ -6,7 +6,7 @@ Controller
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
namespace My\App\Controller;
|
||||
namespace Acme\DemoBundle\Controller;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
@ -20,6 +20,6 @@ Controller
|
||||
*/
|
||||
public function helloAction(array $names)
|
||||
{
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue("Hello ".implode(', ', $names));
|
||||
return "Hello ".implode(', ', $names);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ Controller
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
namespace My\App\Controller;
|
||||
namespace Acme\DemoBundle\Controller;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
@ -22,7 +22,7 @@ Controller
|
||||
/**
|
||||
* @Soap\Method("getUser")
|
||||
* @Soap\Param("name", phpType = "string")
|
||||
* @Soap\Result(phpType = "My\App\Entity\User")
|
||||
* @Soap\Result(phpType = "Acme\DemoBundle\Entity\User")
|
||||
*/
|
||||
public function getUserAction($name)
|
||||
{
|
||||
@ -34,7 +34,7 @@ Controller
|
||||
throw new \SoapFault('USER_NOT_FOUND', sprintf('The user with the name "%s" can not be found', $name));
|
||||
}
|
||||
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue($user);
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ You can expose only the properties (public, protected or private) of a complex t
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
namespace My\App\Entity;
|
||||
namespace Acme\DemoBundle\Entity;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
|
||||
@ -82,4 +82,4 @@ ComplexType
|
||||
|
||||
`ComplexType` accepts the following options:
|
||||
|
||||
* nillable: To specify that the value can be null
|
||||
* nillable: To specify that the value can be null
|
||||
|
@ -6,7 +6,7 @@ Controller
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
namespace My\App\Controller;
|
||||
namespace Acme\DemoBundle\Controller;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
@ -28,7 +28,7 @@ Controller
|
||||
throw new \SoapFault("INVALID_API_KEY", "The api_key is invalid.");
|
||||
}
|
||||
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue("Hello ".implode(', ', $names));
|
||||
return "Hello ".implode(', ', $names);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ If you want use a header for all actions of your controller you can declare the
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
namespace My\App\Controller;
|
||||
namespace Acme\DemoBundle\Controller;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
|
||||
use Symfony\Component\DependencyInjection\ContainerAware;
|
||||
@ -57,7 +57,7 @@ If you want use a header for all actions of your controller you can declare the
|
||||
*/
|
||||
public function helloAction(array $names)
|
||||
{
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue("Hello ".implode(', ', $names));
|
||||
return "Hello ".implode(', ', $names);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@ If you want use a header for all actions of your controller you can declare the
|
||||
*/
|
||||
public function welcomeAction($names)
|
||||
{
|
||||
return $this->container->get('besimple.soap.response')->setReturnValue("Welcome ".implode(', ', $names));
|
||||
return "Welcome ".implode(', ', $names);
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container = null)
|
||||
@ -86,4 +86,4 @@ If you want use a header for all actions of your controller you can declare the
|
||||
throw new \SoapFault("INVALID_API_KEY", "The api_key is invalid.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user