nox-it/yii2-soap-client

This package is abandoned and no longer maintained. No replacement package was suggested.

Yii2 HTTP SOAP Client

2.0.0 2020-05-02 01:13 UTC

This package is auto-updated.

Last update: 2022-06-01 20:11:56 UTC


README

Yii2 component for SOAP requests.

Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads composer.lock

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 HttpSoapClient component 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.

Yii2