forked from clue/reactphp-soap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11-wsdl-info.php
More file actions
29 lines (22 loc) · 823 Bytes
/
Copy path11-wsdl-info.php
File metadata and controls
29 lines (22 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
use Clue\React\Buzz\Browser;
use Clue\React\Soap\Client;
use Psr\Http\Message\ResponseInterface;
require __DIR__ . '/../vendor/autoload.php';
$loop = React\EventLoop\Factory::create();
$browser = new Browser($loop);
$wsdl = isset($argv[1]) ? $argv[1] : 'http://www.thomas-bayer.com/axis2/services/BLZService?wsdl';
$browser->get($wsdl)->done(
function (ResponseInterface $response) use ($browser) {
$client = new Client($browser, (string)$response->getBody());
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();