yii2-services WebService encapsulates SoapServer and provides a WSDL-based web service.

Web Service for Yii2 framework

  1. Description
  2. Installation
  3. Usage
  4. License
  5. Resources

Description

WebService encapsulates SoapServer and provides a WSDL-based web service.

Adaptation of Yii1 Web Services

Installation

The preferred way to install this extension is through composer.

To install, either run

$ php composer.phar require conquer/services "*"

or add

"conquer/services": "*"

to the `require` section of your composer.json file.

Usage

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
{
    /**
     * @var string
     * @soap
     */
    public $name;
}

License

conquer/services is released under the BSD License. See the bundled LICENSE.md for details.

Resources

GitHub

0 0
1 follower
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: Web Service
Developed by: Andrey Borodulin
Created on: Apr 10, 2015
Last updated: 9 years ago

Related Extensions