vladkras / yii2-nox-http-soap-client

Yii2 component for SOAP requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yii PHP Framework Version 2 / NOX HttpSoapClient

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 "nox-it/yii2-soap-client" "*"

or add

"nox-it/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'    => 'nox\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 nox\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

About

Yii2 component for SOAP requests

License:Other


Languages

Language:PHP 100.0%