Updated doc
This commit is contained in:
parent
55ae5e7e99
commit
b5fbb9192c
|
@ -23,6 +23,4 @@ The limit is the maximum number of in-memory cached WSDL files (**5 is the defau
|
|||
|
||||
The WSDL files cached are written in cache folder of your Symfony2 application.
|
||||
|
||||
If you want more information you can visit the following page `PHP Soap runtime configuration`_.
|
||||
|
||||
.. _`PHP Soap runtime configuration`: http://www.php.net/manual/en/soap.configuration.php
|
||||
If you want more information you can visit the following page `PHP Soap runtime configuration <http://www.php.net/manual/en/soap.configuration.php>`_.
|
||||
|
|
|
@ -3,7 +3,7 @@ BeSimpleSoapBundle
|
|||
==================
|
||||
|
||||
The BeSimpleSoapBundle is a Symfony2 bundle to build WSDL and SOAP based web services.
|
||||
It is based on the `ckWebServicePlugin`_ for symfony.
|
||||
It is based on the `ckWebServicePlugin <http://www.symfony-project.org/plugins/ckWebServicePlugin>`_ for symfony.
|
||||
|
||||
---------------
|
||||
Reference Guide
|
||||
|
@ -13,7 +13,9 @@ Reference Guide
|
|||
:maxdepth: 1
|
||||
:numbered:
|
||||
|
||||
installation
|
||||
requirements
|
||||
installation_composer
|
||||
installation_deps
|
||||
cache
|
||||
|
||||
----------
|
||||
|
@ -33,5 +35,3 @@ SoapClient
|
|||
----------
|
||||
|
||||
Coming soon.
|
||||
|
||||
.. _`ckWebServicePlugin`: http://www.symfony-project.org/plugins/ckWebServicePlugin
|
|
@ -0,0 +1,54 @@
|
|||
Installation with Composer
|
||||
==========================
|
||||
|
||||
Add `besimple/soap-bundle <https://packagist.org/packages/besimple/soap-bundle>`_ (with vendors) in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-bundle": "dev-master",
|
||||
"besimple/soap-common": "dev-master",
|
||||
"ass/xmlsecurity": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
To install the server please add `besimple/soap-server <https://packagist.org/packages/besimple/soap-server>`_ in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-server": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
To install the client please add `besimple/soap-client <https://packagist.org/packages/besimple/soap-client>`_ in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-client": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
Run this command to download the new vendors:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php composer.phar update
|
||||
|
||||
Enable the `BeSimpleSoapBundle <https://github.com/BeSimple/BeSimpleSoapBundle>`_ in your Kernel class
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
// app/AppKernel.php
|
||||
public function registerBundles()
|
||||
{
|
||||
return array(
|
||||
// ...
|
||||
new BeSimple\SoapBundle\BeSimpleSoapBundle(),
|
||||
// ...
|
||||
);
|
||||
}
|
|
@ -1,68 +1,10 @@
|
|||
Installation
|
||||
============
|
||||
Installation with deps file (deprecated)
|
||||
========================================
|
||||
|
||||
Requirements
|
||||
------------
|
||||
**The installation with deps file is deprecated.
|
||||
Please prefer install the** `BeSimpleSoapBundle <https://github.com/BeSimple/BeSimpleSoapBundle>`_ **with** `Composer <http://getcomposer.org>`_.
|
||||
|
||||
Install and enable PHP's SOAP extension.
|
||||
|
||||
With Composer
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Add `besimple/soap-bundle` (with vendors) in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-bundle": "dev-master",
|
||||
"besimple/soap-common": "dev-master",
|
||||
"ass/xmlsecurity": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
To install the server please add `besimple/soap-server` in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-server": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
To install the client please add `besimple/soap-client` in your composer.json:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"require": {
|
||||
"besimple/soap-client": "dev-master"
|
||||
}
|
||||
}
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ php composer.phar update
|
||||
|
||||
Enable the `BeSimpleSoapBundle` in your Kernel class
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
// app/AppKernel.php
|
||||
public function registerBundles()
|
||||
{
|
||||
return array(
|
||||
// ...
|
||||
new BeSimple\SoapBundle\BeSimpleSoapBundle(),
|
||||
// ...
|
||||
);
|
||||
}
|
||||
|
||||
With deps file (outdated)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Download `BeSimple\\SoapCommon`_ and `BeSimple\\SoapServer`_ (only for the server part) and/or `BeSimple\\SoapClient`_ (only for ther client part).
|
||||
Download `BeSimple\\SoapCommon <http://github.com/BeSimple/BeSimpleSoapCommon>`_ and `BeSimple\\SoapServer <http://github.com/BeSimple/BeSimpleSoapServer>`_ (only for the server part) and/or `BeSimple\\SoapClient <http://github.com/BeSimple/BeSimpleSoapClient>`_ (only for ther client part).
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
|
@ -92,7 +34,7 @@ Add `BeSimple` libraries in autoload.php
|
|||
// your other namespaces
|
||||
));
|
||||
|
||||
Download `Zend\\Soap`_ and `Zend\\Mime`_ or add in `deps` file. `Zend` library is required only for the server part.
|
||||
Download `Zend\\Soap <http://github.com/BeSimple/zend-soap>`_ and `Zend\\Mime <http://github.com/BeSimple/zend-mime>`_ or add in `deps` file. `Zend` library is required only for the server part.
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
|
@ -115,10 +57,7 @@ Add `Zend` library in autoload.php
|
|||
// your other namespaces
|
||||
));
|
||||
|
||||
Installation
|
||||
````````````
|
||||
|
||||
`Download`_ the bundle or add in `deps` file
|
||||
`Download <http://github.com/BeSimple/BeSimpleSoapBundle>`_ the bundle or add in `deps` file
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
|
@ -150,10 +89,3 @@ Add `BeSimpleSoapBundle` in your Kernel class
|
|||
// ...
|
||||
);
|
||||
}
|
||||
|
||||
.. _`Zend\\Soap`: http://github.com/BeSimple/zend-soap
|
||||
.. _`Zend\\Mime`: http://github.com/BeSimple/zend-mime
|
||||
.. _`BeSimple\\SoapCommon`: http://github.com/BeSimple/BeSimpleSoapCommon
|
||||
.. _`BeSimple\\SoapServer`: http://github.com/BeSimple/BeSimpleSoapServer
|
||||
.. _`BeSimple\\SoapClient`: http://github.com/BeSimple/BeSimpleSoapClient
|
||||
.. _`Download`: http://github.com/BeSimple/BeSimpleSoapBundle
|
|
@ -0,0 +1,4 @@
|
|||
Requirements
|
||||
============
|
||||
|
||||
Install and enable PHP's `SOAP extension <http://www.php.net/manual/en/soap.setup.php>`.
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue