Ejemplo n.º 1
0
 public function setUp()
 {
     $this->loop = React\EventLoop\Factory::create();
     $factory = new Factory($this->loop);
     $promise = $factory->createClient('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl');
     $this->expectPromiseResolve($promise);
     $this->client = Block\await($promise, $this->loop);
     /* @var $client Client */
 }
Ejemplo n.º 2
0
<?php

use Clue\React\Soap\Factory;
use Clue\React\Soap\Proxy;
use Clue\React\Soap\Client;
require __DIR__ . '/../vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$factory = new Factory($loop);
$blz = isset($argv[1]) ? $argv[1] : '12070000';
$factory->createClient('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl')->then(function (Client $client) use($blz) {
    //var_dump($client->getFunctions(), $client->getTypes());
    $api = new Proxy($client);
    $api->getBank(array('blz' => $blz))->then(function ($result) {
        echo 'SUCCESS!' . PHP_EOL;
        var_dump($result);
    }, function (Exception $e) {
        echo 'ERROR: ' . $e->getMessage() . PHP_EOL;
    });
});
$loop->run();
Ejemplo n.º 3
0
<?php

use Clue\React\Soap\Factory;
use Clue\React\Soap\Proxy;
use Clue\React\Soap\Client;
require __DIR__ . '/../vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$factory = new Factory($loop);
$wsdl = isset($argv[1]) ? $argv[1] : 'http://www.thomas-bayer.com/axis2/services/BLZService?wsdl';
$factory->createClient($wsdl)->then(function (Client $client) {
    echo 'Functions:' . PHP_EOL . implode(PHP_EOL, $client->getFunctions()) . PHP_EOL . PHP_EOL . 'Types:' . PHP_EOL . implode(PHP_EOL, $client->getTypes()) . PHP_EOL;
}, function (Exception $e) {
    echo 'Error: ' . $e->getMessage() . PHP_EOL;
});
$loop->run();