PHP code example of viktorprogger / async-soap-guzzle
1. Go to this page and download the library: Download viktorprogger/async-soap-guzzle 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/ */
viktorprogger / async-soap-guzzle example snippets
use GuzzleHttp\Client;
use Meng\AsyncSoap\Guzzle\Factory;
$factory = new Factory();
$client = $factory->create(new Client(), 'http://www.webservicex.net/Statistics.asmx?WSDL');
// async call
$promise = $client->callAsync('GetStatistics', [['X' => [1,2,3]]]);
$result = $promise->wait();
// sync call
$result = $client->call('GetStatistics', [['X' => [1,2,3]]]);
// magic method
$promise = $client->GetStatistics(['X' => [1,2,3]]);
$result = $promise->wait();