Extends the native PHP Soap Client with some more options. The class uses cURL to make the requests.
Run: composer require inteleon/soap-client
The usage is the same as the native SoapClient class.
$client->setTimeout(30000); //The maximum number of milliseconds to execute.
$client->setConnectTimeout(30000); //The number of milliseconds to wait while trying to connect.
$client->setConnectAttempts(2); //Number of connect attempts if connection fails
$client->setVerifyCertificate(true); //Verify the SSL certificate. WARNING: Turning off CURLOPT_SSL_VERIFYPEER allows man in the middle (MITM) attacks, which you don't want!
$client->setUserAgent('Foo');
$client->setCurlOption(CURLOPT_XXX, ''); //See http://php.net/manual/en/function.curl-setopt.php
- Ability to set timeouts/options on the WSDL fetching. As the native SoapClient seems to do this in the constructor it is hard to overwrite it.
- More and better tests