diff --git a/library/Vmwarephp/Factory/SoapClient.php b/library/Vmwarephp/Factory/SoapClient.php index 81fa0bb..ea561f2 100644 --- a/library/Vmwarephp/Factory/SoapClient.php +++ b/library/Vmwarephp/Factory/SoapClient.php @@ -11,15 +11,23 @@ function __construct(\Vmwarephp\WsdlClassMapper $mapper = null, $wsdlFilePath = $this->wsdlFilePath = $wsdlFilePath ? : $this->getWsdlFilePath(); } - function make(\Vmwarephp\Vhost $vhost, $useExceptions = 1, $trace = 1) { - $options = array( - 'trace' => $trace, - 'location' => $this->makeRequestsLocation($vhost), - 'exceptions' => $useExceptions, - 'connection_timeout' => 10, - 'classmap' => $this->wsdlClassMapper->getClassMap(), - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS + SOAP_USE_XSI_ARRAY_TYPE - ); + function make(\Vmwarephp\Vhost $vhost, $useExceptions = 1, $trace = 1) { + $options = array( + 'trace' => $trace, + 'location' => $this->makeRequestsLocation($vhost), + 'exceptions' => $useExceptions, + 'connection_timeout' => 10, + 'classmap' => $this->wsdlClassMapper->getClassMap(), + 'features' => SOAP_SINGLE_ELEMENT_ARRAYS + SOAP_USE_XSI_ARRAY_TYPE, + 'stream_context' => stream_context_create( + array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + ) + ) + ) + ); $soapClient = $this->makeDefaultSoapClient($this->wsdlFilePath, $options); if (!$soapClient) throw new Ex\CannotCreateSoapClient(); return $soapClient;