当前位置: 首页>>代码示例>>PHP>>正文


PHP SoapClient::SoapClient方法代码示例

本文整理汇总了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);
 }
开发者ID:npotier,项目名称:soap-plus,代码行数:33,代码来源:SoapClientPlus.php

示例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);
     }
 }
开发者ID:waarneembemiddeling,项目名称:bigregister-soap,代码行数:26,代码来源:Client.php

示例3: SoapClientHMAC

 public function SoapClientHMAC($wsdl, $options = NULL)
 {
     global $context;
     $context = stream_context_create();
     $options['stream_context'] = $context;
     return parent::SoapClient($wsdl, $options);
 }
开发者ID:Gilbertoavitia1,项目名称:AHBS,代码行数:7,代码来源:SoapClientHMAC.php

示例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);
 }
开发者ID:fire1,项目名称:speedy,代码行数:14,代码来源:EPSSOAPInterfaceImpl.class.php

示例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);
 }
开发者ID:kishoreweblabs,项目名称:SobiPro,代码行数:12,代码来源:soap.php

示例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');
 }
开发者ID:RooseveltJavier,项目名称:Proyecto,代码行数:21,代码来源:soapclientauth.php

示例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');
     }
 }
开发者ID:Devlopers-Studio,项目名称:PHP-SharePoint-Lists-API,代码行数:26,代码来源:SoapClientAuth.php

示例8: __construct

 public function __construct($wsdl, $options)
 {
     parent::SoapClient($wsdl, $options);
 }
开发者ID:im286er,项目名称:ent,代码行数:4,代码来源:iDatabase.php

示例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);
 }
开发者ID:dcarbone,项目名称:soap-plus,代码行数:25,代码来源:SoapClientPlus.php

示例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);
 }
开发者ID:jeremylivingston,项目名称:core-proxies,代码行数:12,代码来源:SoapClient.php

示例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);
 }
开发者ID:tests-always-included,项目名称:logging-soapclient,代码行数:6,代码来源:SoapClient.php


注:本文中的SoapClient::SoapClient方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。