mongosoft/yii2-soap-client

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

SOAP Client Extension for Yii 2

Installs: 150 827

Dependents: 1

Suggesters: 0

Security: 0

Stars: 31

Watchers: 4

Forks: 11

Open Issues: 5

Type:yii2-extension

0.1.0 2015-02-10 12:05 UTC

This package is not auto-updated.

Last update: 2020-08-21 19:10:07 UTC


README

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');