nox-it/yii2-soap-client
最新稳定版本:2.0.0
Composer 安装命令:
composer require nox-it/yii2-soap-client
包简介
Yii2 HTTP SOAP Client
README 文档
README
Yii2 component for SOAP requests.
Installation
The preferred way to install this extension is through composer.
- Either run
php composer.phar require --prefer-dist "nyx-solutions/yii2-soap-client" "*"
or add
"nyx-solutions/yii2-soap-client": "*"
to the require section of your application's composer.json file.
Usage
- Configure the
HttpSoapClientcomponent in your application's configuration file, for example:
'components' => [ 'soapApi' => [ 'class' => 'nyx\http\soap\HttpSoapClient', 'endpoint' => 'http://ws.exemple.com/WebService.asmx?wsdl', 'options' => [ 'cache_wsdl' => WSDL_CACHE_NONE ] ] ]
Or you can define the HttpSoapClient directly in your code:
use nyx\http\soap\HttpSoapClient; $client = new HttpSoapClient(['endpoint' => 'http://ws.exemple.com/WebService.asmx?wsdl']);
After the configuration step is compleate, you can call the SOAP methods as follow (where getMessage is your SOAP method):
echo $client->getMessage('Lorem ipsum...');
License
yii2-soap-client is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.
统计信息
- 总下载量: 1.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2017-02-21