2017 © Pedro Peláez
 

library async-soap-guzzle

An asynchronous SOAP client build on top of Guzzle.

image

meng-tian/async-soap-guzzle

An asynchronous SOAP client build on top of Guzzle.

  • Wednesday, May 10, 2017
  • by meng-tian
  • Repository
  • 3 Watchers
  • 57 Stars
  • 150,166 Installations
  • PHP
  • 4 Dependents
  • 1 Suggesters
  • 8 Forks
  • 2 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

Asynchronous SOAP client

codecov.io workflow, (*1)

An asynchronous SOAP client build on top of Guzzle. The SoapClient implements meng-tian/php-async-soap., (*2)

Requirement

PHP 7.1 --enablelibxml --enable-soap, (*3)

Install

composer require meng-tian/async-soap-guzzle

Usage

From v0.4.0 or newer, an instance of Psr\Http\Message\RequestFactoryInterface and an instance of Psr\Http\Message\StreamFactoryInterface need to be injected into Meng\AsyncSoap\Guzzle\Factory. These two interfaces are defined in PSR-17 to create PSR-7 compliant HTTP instances. This change will decouple this library from any specific implementation of PSR-7 and PSR-17. Clients can determine which implementation of PSR-17 they want to use. Plenty of different implementations of PSR17 can be found from Packagist, e.g., symfony/psr-http-message-bridge, or laminas/laminas-diactoros., (*4)

  1. Require this library and an implementation of PSR-17 in your composer.json:
...
    "require": {
        "php": ">=7.1.0",
        "meng-tian/async-soap-guzzle": "~0.4.0",
        "laminas/laminas-diactoros": "^2.0"  # this can be replaced by any implementation of PSR-17
    },
...
  1. Run composer install, (*5)

  2. Create your async SOAP client and call your SOAP messages:, (*6)

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., (*7)

The Versions

10/05 2017

dev-master

9999999-dev

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

03/12 2016

v0.2.4

0.2.4.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

21/06 2016

v0.2.3

0.2.3.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

24/04 2016

v0.2.2

0.2.2.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

22/04 2016

v0.2.1

0.2.1.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

19/04 2016

v0.2.0

0.2.0.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap

03/04 2016

v0.1.0

0.1.0.0

An asynchronous SOAP client build on top of Guzzle.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Meng Tian

guzzle asynchronous soap