PHP code example of mongosoft / yii2-soap-client
1. Go to this page and download the library: Download mongosoft/yii2-soap-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mongosoft / yii2-soap-client example snippets
'components' => [
'siteApi' => [
'class' => 'mongosoft\soapclient\Client',
'url' => 'http://myservice.com/api/hello',
'options' => [
'cache_wsdl' => WSDL_CACHE_NONE,
],
]
...
]
$client = new \mongosoft\soapclient\Client([
'url' => 'http://myservice.com/api/hello',
]);
$client = Yii::$app->siteApi;
echo $client->getHello('Alex');