mongosoft/yii2-soap-client SOAP Client Extension for Yii 2

extensionsoapconsumer

SOAP Client Extension for Yii 2

Note, PHP SOAP extension is required.

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Usage

You need to setup soap client application component:

'components' => [
    'siteApi' => [
        'class' => 'mongosoft\soapclient\Client',
        'url' => 'http://myservice.com/api/hello',
        'options' => [
            'cache_wsdl' => WSDL_CACHE_NONE,
        ],
    ]
    ...
]

or define the client directly in the code:

$client = new \mongosoft\soapclient\Client([
    'url' => 'http://myservice.com/api/hello',
]);

Example of calling the SOAP function:

$client = Yii::$app->siteApi;
echo $client->getHello('Alex');

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



0.1.0 is the latest of one release



BSD-3-Clause license
Stats
30 github stars & 12 github forks
83 downloads in the last day
2931 downloads in the last 30 days
146255 total downloads