diff --git a/src/Sap/Infrastructure/SoapAdapter.php b/src/Sap/Infrastructure/SoapAdapter.php index 7e40bb7..612cedf 100644 --- a/src/Sap/Infrastructure/SoapAdapter.php +++ b/src/Sap/Infrastructure/SoapAdapter.php @@ -12,7 +12,11 @@ class SoapAdapter implements AdapterInterface private $error; public function __construct( - $wsdl, $login, $password, $soapVersion + $wsdl, + $login, + $password, + $soapVersion, + $connTimeout = 60 ){ try{ $this->client = new SoapClient($wsdl, @@ -20,7 +24,8 @@ public function __construct( 'login' => $login, 'password' => $password, 'soap_version' => $soapVersion, - 'cache_wsdl' => WSDL_CACHE_DISK + 'cache_wsdl' => WSDL_CACHE_DISK, + 'connection_timeout' => $connTimeout, ]); } catch (\Exception $e) { $this->error = $e->getMessage(); @@ -48,4 +53,4 @@ private function prepareArguments(array $arguments) } return $arguments; } -} \ No newline at end of file +}