1. Go to this page and download the library: Download clue/soap-react library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
clue / soap-react example snippets
ser = new React\Http\Browser();
$wsdl = 'http://example.com/demo.wsdl';
$browser->get($wsdl)->then(function (Psr\Http\Message\ResponseInterface $response) use ($browser) {
$client = new Clue\React\Soap\Client($browser, (string)$response->getBody());
$api = new Clue\React\Soap\Proxy($client);
$api->getBank(array('blz' => '12070000'))->then(function ($result) {
var_dump('Result', $result);
});
});
$browser = new React\Http\Browser();
$browser->get($url)->then(
function (Psr\Http\Message\ResponseInterface $response) use ($browser) {
// WSDL file is ready, create client
$client = new Clue\React\Soap\Client($browser, (string)$response->getBody());
// do something…
},
function (Exception $e) {
// an error occured while trying to download the WSDL
}
);
$proxy->myMethod($myArg1, $myArg2)->then(function ($response) {
// result received
});
$proxy->demo()->then(
function ($response) {
// response received for demo function
},
function (Exception $e) {
// an error occured while executing the request
}
});
$promise = $proxy->demo();
Loop::addTimer(2.0, function () use ($promise) {
$promise->cancel();
});
$browser = new React\Http\Browser();
$browser = $browser->withTimeout(10.0);
$client = new Clue\React\Soap\Client($browser, $wsdl);
$proxy = new Clue\React\Soap\Proxy($client);
$proxy->demo()->then(function ($response) {
// response received within 10 seconds maximum
var_dump($response);
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.