本文整理汇总了PHP中SoapClient::SoapClient方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::SoapClient方法的具体用法?PHP SoapClient::SoapClient怎么用?PHP SoapClient::SoapClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoapClient
的用法示例。
在下文中一共展示了SoapClient::SoapClient方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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);
}
示例2: __construct
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);
}
}
示例3: SoapClientHMAC
public function SoapClientHMAC($wsdl, $options = NULL)
{
global $context;
$context = stream_context_create();
$options['stream_context'] = $context;
return parent::SoapClient($wsdl, $options);
}
示例4:
/**
* 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);
}
示例5: __construct
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);
}
示例6: SoapClientAuth
/**
*
* @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');
}
示例7: __construct
/**
*
* @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');
}
}
示例8: __construct
public function __construct($wsdl, $options)
{
parent::SoapClient($wsdl, $options);
}
示例9: __construct
/**
* 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);
}
示例10: SoapClient
/**
* @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);
}
示例11: __construct
public function __construct($wsdl, array $options = array())
{
//Set trace to true, or we cannot log the XML
$options['trace'] = true;
parent::SoapClient($wsdl, $options);
}