Version 1.5
WebService encapsulates SoapServer and provides a WSDL-based web service. Adaptation of Yii1 Web Services
Based on work of Qiang Xue qiang.xue@gmail.com and Andrey Borodulin
Change log is below
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require uhi67/yii2-soap-server "^1.5"
or add
"uhi67/yii2-soap-server": "^1.5"
to the require
section of your composer.json
file.
namespace app\controllers;
class SiteController extends \yii\web\Controller
{
public function actions()
{
return [
'soap' => [
'class' => 'conquer\services\WebServiceAction',
'classMap' => [
'MyClass' => 'app\controllers\MyClass'
],
],
];
}
/**
* @param \app\controllers\MyClass $myClass
* @return string
* @soap
*/
public function soapTest($myClass)
{
return get_class($myClass);
}
}
/**
* Class MyClass
* @soap
*/
class MyClass
{
/**
* @var string
* @soap
*/
public $name;
}
- Before testing, run once
composer install
from repository root. - Run
php tests/app/yii serve
if you're going to run acceptance tests. - Run
codecept run
from repository root.
uhi67/yii2-soap-server is released under the BSD License. See the bundled LICENSE.md
for details.
- corrections for codeception functional testing and some test examples
- online API documentation with
?doc
query