/** * Constructor * * @param string $wsdl * @param array $options * @throws \Exception * @return \DCarbone\SoapPlus\SoapClientPlus */ public function __construct($wsdl, array $options = array()) { $this->curlPlusClient = new CurlPlusClient(); if (!isset(self::$wsdlCachePath)) { $wsdlCachePath = realpath(__DIR__ . DIRECTORY_SEPARATOR . 'WSDL'); if ($wsdlCachePath === false || !is_writable($wsdlCachePath)) { $wsdlCachePath = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'WSDL'; $created = mkdir($wsdlCachePath); if ($created === false) { throw new \Exception('DCarbone::SoapPlus - WSDL temp directory is not writable / creatable!'); } $created = mkdir($wsdlCachePath . DIRECTORY_SEPARATOR . 'Temp'); if ($created === false) { throw new \Exception('DCarbone::SoapPlus - WSDL temp directory is not writable / creatable!'); } } self::$wsdlCachePath = $wsdlCachePath; } $this->options = $options; $this->parseOptions(); if ($wsdl !== null && strtolower(substr($wsdl, 0, 4)) === 'http') { $wsdl = $this->loadWSDL($wsdl); } parent::SoapClient($wsdl, $this->soapOptions); }
public function __construct($wsdl = null, array $userOptions = array(), Cache $cache = null, $cacheTtl = 0, $disableErrorsInConstructor = false) { $wsdl = $wsdl ? $wsdl : 'http://webservices.cibg.nl/Ribiz/OpenbaarV4.asmx?wsdl'; $namespace = 'Wb\\BigRegister\\SoapClient\\Model\\'; $options = array('features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'cache_wsdl' => WSDL_CACHE_NONE, 'classmap' => array('ListHcpApproxRequest' => $namespace . 'ListHcpApproxRequest', 'ListHcpApproxResponse4' => $namespace . 'ListHcpApproxResponse4', 'Address' => $namespace . 'Address', 'ListHcpApprox4' => $namespace . 'ListHcpApprox4', 'ArticleRegistrationExtApp' => $namespace . 'ArticleRegistrationExtApp', 'ArrayOfArticleRegistrationExtApp' => $namespace . 'ArrayOfArticleRegistrationExtApp', 'SpecialismExtApp1' => $namespace . 'SpecialismExtApp1', 'ArrayOfSpecialismExtApp1' => $namespace . 'ArrayOfSpecialismExtApp1', 'ArrayOfListHcpApprox' => $namespace . 'ArrayOfListHcpApprox', 'ArrayOfRegistrationProvisionNoteExtApp' => $namespace . 'ArrayOfRegistrationProvisionNoteExtApp', 'RegistrationProvisionNoteExtApp' => $namespace . 'RegistrationProvisionNoteExtApp', 'ArrayOfListHcpApprox4' => $namespace . 'ArrayOfListHcpApprox4', 'ArrayOfMentionExtApp' => $namespace . 'ArrayOfMentionExtApp', 'MentionExtApp' => $namespace . 'MentionExtApp', 'ArrayOfJudgmentProvisionExtApp' => $namespace . 'ArrayOfJudgmentProvisionExtApp', 'JudgmentProvisionExtApp' => $namespace . 'JudgmentProvisionExtApp', 'ArrayOfLimitationExtApp' => $namespace . 'ArrayOfLimitationExtApp', 'LimitationExtApp' => $namespace . 'LimitationExtApp', 'ArrayOfProfessionalGroup' => $namespace . 'ArrayOfProfessionalGroup', 'ProfessionalGroup' => $namespace . 'ProfessionalGroup', 'ArrayOfTypeOfSpecialism' => $namespace . 'ArrayOfTypeOfSpecialism', 'TypeOfSpecialism' => $namespace . 'TypeOfSpecialism')); $options = array_merge($options, $userOptions); $this->cache = $cache; $this->cacheTtl = (int) $cacheTtl; // Disable exceptions and warnings in __construct. When using this client via a service container like the // Symfony2 one, instantiating the client results in a non catchable fatal when WSDL is down. With this // parameter you can disable it, so you can try catch the call itself. // Be warned you should catch SoapFault exceptions when calling the webservice. if ($disableErrorsInConstructor) { // Disable error handler for now $previous = set_error_handler(function () { }, E_ALL); try { parent::SoapClient($wsdl, $options); } catch (\SoapFault $e) { } // Restore previous error handler set_error_handler($previous); } else { parent::SoapClient($wsdl, $options); } }
public function SoapClientHMAC($wsdl, $options = NULL) { global $context; $context = stream_context_create(); $options['stream_context'] = $context; return parent::SoapClient($wsdl, $options); }
/** * Constructs new instance of SOAP service * @param string $wsdlURL * @param options[optional] */ function __construct($wsdlURL = self::SPEEDY_SOAP_WSDL_V01_URL, $options = null) { if (is_null($options)) { parent::SoapClient($wsdlURL); } else { parent::SoapClient($wsdlURL, $options); } // echo('<BR>Connected to '.$wsdlURL); }
public function __construct($wdsl, $options = array()) { if (!isset($options['user_agent'])) { $options['user_agent'] = self::UA; } if (!isset($options['uri'])) { $options['uri'] = self::URI; } $options['trace'] = 1; $options['exceptions'] = 0; parent::SoapClient($wdsl, $options); }
/** * * @param string $wsdl * @param array $options */ function SoapClientAuth($wsdl, $options = NULL) { stream_wrapper_unregister('https'); stream_wrapper_unregister('http'); stream_wrapper_register('https', 'streamWrapperHttpAuth'); stream_wrapper_register('http', 'streamWrapperHttpAuth'); if ($options) { $this->Username = $options['login']; streamWrapperHttpAuth::$Username = $this->Username; $this->Password = $options['password']; streamWrapperHttpAuth::$Password = $this->Password; } parent::SoapClient($wsdl, $options ? $options : array()); stream_wrapper_restore('https'); stream_wrapper_restore('http'); }
/** * * @param string $wsdl * @param array $options */ public function __construct($wsdl, $options = NULL) { $wrappers = stream_get_wrappers(); stream_wrapper_unregister('http'); stream_wrapper_register('http', '\\Thybag\\Auth\\StreamWrapperHttpAuth'); if (in_array("https", $wrappers)) { stream_wrapper_unregister('https'); stream_wrapper_register('https', '\\Thybag\\Auth\\StreamWrapperHttpAuth'); } if ($options) { $this->Username = $options['login']; \Thybag\Auth\StreamWrapperHttpAuth::$Username = $this->Username; $this->Password = $options['password']; \Thybag\Auth\StreamWrapperHttpAuth::$Password = $this->Password; } parent::SoapClient($wsdl, $options ? $options : array()); stream_wrapper_restore('http'); if (in_array("https", $wrappers)) { stream_wrapper_restore('https'); } }
public function __construct($wsdl, $options) { parent::SoapClient($wsdl, $options); }
/** * Constructor * * @param string $wsdl * @param array $options * @throws \RuntimeException */ public function __construct($wsdl, array $options = array()) { $this->curlPlusClient = new CurlPlusClient(); $this->_options = $options; $this->_wsdlCachePath = static::setupWSDLCachePath($options); $this->curlOptArray = $this->_defaultCurlOptArray = static::createCurlOptArray($options); $this->_soapOptions = static::createSoapOptionArray($options); $this->requestHeaders = $this->_defaultRequestHeaders = array('Content-type' => 'text/xml;charset="utf-8"', 'Accept' => 'text/xml', 'Cache-Control' => 'no-cache', 'Pragma' => 'no-cache'); if ($wsdl !== null && strtolower(substr($wsdl, 0, 4)) === 'http') { $wsdl = $this->loadWSDL($wsdl); } if (defined('LIBXML_PARSEHUGE')) { $this->_sxeArgs = LIBXML_COMPACT | LIBXML_NOBLANKS | LIBXML_PARSEHUGE; } else { $this->_sxeArgs = LIBXML_COMPACT | LIBXML_NOBLANKS; } parent::SoapClient($wsdl, $this->_soapOptions); }
/** * @link http://php.net/manual/en/soapclient.soapclient.php * * @param mixed $wsdl * @param array $options * * @return \CoreProxies\Proxy\SoapClient */ public function SoapClient($wsdl, $options = array()) { parent::SoapClient($wsdl, $options); }
public function __construct($wsdl, array $options = array()) { //Set trace to true, or we cannot log the XML $options['trace'] = true; parent::SoapClient($wsdl, $options); }