megamenin/yii2-soap-server
Composer 安装命令:
composer require megamenin/yii2-soap-server
包简介
SOAP server for the Yii 2 framework based on the Yii 1 implementation
README 文档
README
A SOAP server for Yii 2 based on the implementation of Yii 1 framework.
This extension is an adaptation of the SOAP Web Service available in Yii1, to Yii2. It contains features available up to v1.1.15.
Note: Things might not work as Yii2 progresses but I'll keep it updated as much as I can.
Requirements
Installation
Use composer and add the following line to your composer.json file:
"subdee/yii2-soap-server": "*"
Usage
Usage is similar to the explanation in the Yii guide
Define the custom action in your controller:
public function actions() { return [ ..., 'myService' => [ 'class' => 'subdee\soapserver\SoapAction', ], ..., ]; }
Add the @soap keyword to the properly documented actions you want:
/** * Returns hello and the name that you gave * * @param string $name Your name * @return string * @soap */ public function getHello($name) { return 'Hello ' . $name; }
Also, remember to turn off CSRF validation for the controller by setting its property:
public $enableCsrfValidation = false;
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-02-16