-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy path01-client-blz-wsdl.php
More file actions
22 lines (17 loc) · 700 Bytes
/
01-client-blz-wsdl.php
File metadata and controls
22 lines (17 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
require __DIR__ . '/../vendor/autoload.php';
$browser = new React\Http\Browser();
$blz = isset($argv[1]) ? $argv[1] : '12070000';
$browser->get('http://www.thomas-bayer.com/axis2/services/BLZService?wsdl')->done(function (Psr\Http\Message\ResponseInterface $response) use ($browser, $blz) {
$client = new Clue\React\Soap\Client($browser, (string)$response->getBody());
$api = new Clue\React\Soap\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;
}
);
});