mongosoft/yii2-soap-server SOAP Server Extension for Yii 2

extensionserversoapwsdl

SOAP Server Extension for Yii 2

Note, PHP SOAP extension is required.

Latest Version Software License Build Status Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist mongosoft/yii2-soap-server "*"

or add

"mongosoft/yii2-soap-server": "*"

to the require section of your composer.json file.

Usage

You need to add [[mongosoft\soapserver\Action]] to web controller.

Note, In a service class, a remote invokable method must be a public method with a doc comment block containing the '@soap' tag.

class ApiController extends Controller
{
    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'hello' => 'mongosoft\soapserver\Action',
        ];
    }

    /**
     * @param string $name
     * @return string
     * @soap
     */
    public function getHello($name)
    {
        return 'Hello ' . $name;
    }
}

In case you want to disable the WSDL mode of SoapServer, you can specify this in the serviceOptions parameter as indicated below. You can use this when the request is to complex for the WSDL generator.

    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'index' => [
                'class' => 'mongosoft\soapserver\Action',
                'serviceOptions' => [
                    'disableWsdlMode' => true,
                ]
            ]
        ];
    }

Testing

$ vendor/bin/codecept run Unit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



0.2.1 is the latest of 6 releases



MIT license
Stats
25 github stars & 10 github forks
93 downloads in the last day
2234 downloads in the last 30 days
204306 total downloads