meng-tian / async-soap-guzzle
An asynchronous SOAP client build on top of Guzzle.
Installs: 1 229 252
Dependents: 8
Suggesters: 1
Security: 0
Stars: 88
Watchers: 2
Forks: 18
Open Issues: 1
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ^6.1 || ^7.0
- meng-tian/php-async-soap: ~1.0
- meng-tian/soap-http-binding: ~0.4.0
- psr/http-factory: ~1.0
Requires (Dev)
- laminas/laminas-diactoros: ^2.0
- phpunit/phpunit: ~7.0
README
An asynchronous SOAP client build on top of Guzzle. The SoapClient
implements meng-tian/php-async-soap.
Requirement
PHP 7.1 --enablelibxml --enable-soap
Install
composer require meng-tian/async-soap-guzzle
Usage
use GuzzleHttp\Client; use Meng\AsyncSoap\Guzzle\Factory; use Laminas\Diactoros\RequestFactory; use Laminas\Diactoros\StreamFactory; $factory = new Factory(); $client = $factory->create(new Client(), new StreamFactory(), new RequestFactory(), '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();
License
This library is released under MIT license.