inteleon / soap-client
Inteleon Soap Client
Installs: 24 933
Dependents: 3
Suggesters: 0
Security: 0
Stars: 4
Watchers: 19
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 4.2.*
This package is not auto-updated.
Last update: 2025-01-18 18:00:27 UTC
README
Extends the native PHP Soap Client with some more options. The class uses cURL to make the requests.
Installation
Run: composer require inteleon/soap-client
How to use
The usage is the same as the native SoapClient class.
Options
Timeouts (milliseconds)
$client->setTimeout(30000); //The maximum number of milliseconds to execute. $client->setConnectTimeout(30000); //The number of milliseconds to wait while trying to connect.
Connect attempts
$client->setConnectAttempts(2); //Number of connect attempts if connection fails
Verify SSL certificate
$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!
HTTP user agent
$client->setUserAgent('Foo');
Custom cURL option
$client->setCurlOption(CURLOPT_XXX, ''); //See http://php.net/manual/en/function.curl-setopt.php
Todo
- 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