Пример #1
0
 /**
  * SOAP_Client constructor
  *
  * @param string endpoint (URL)
  * @param boolean wsdl (true if endpoint is a wsdl file)
  * @param string portName
  * @param array  contains options for HTTP_Request class (see HTTP/Request.php)
  * @access public
  */
 function SOAP_Client($endpoint, $wsdl = false, $portName = false, $proxy_params = array())
 {
     parent::SOAP_Base('Client');
     $this->_endpoint = $endpoint;
     $this->_portName = $portName;
     $this->__proxy_params = $proxy_params;
     $wsdl = $wsdl ? $wsdl : strcasecmp('wsdl', substr($endpoint, strlen($endpoint) - 4)) == 0;
     // make values
     if ($wsdl) {
         $this->__endpointType = 'wsdl';
         // instantiate wsdl class
         $this->_wsdl =& new SOAP_WSDL($this->_endpoint, $this->__proxy_params);
         if ($this->_wsdl->fault) {
             $this->_raiseSoapFault($this->_wsdl->fault);
         }
     }
 }
Пример #2
0
 /**
  * Constructor.
  *
  * @access public
  *
  * @param string $endpoint     An URL.
  * @param boolean $wsdl        Whether the endpoint is a WSDL file.
  * @param string $portName
  * @param array $proxy_params  Options for the HTTP_Request class (see
  *                             HTTP/Request.php)
  */
 function SOAP_Client($endpoint, $wsdl = false, $portName = false, $proxy_params = array())
 {
     parent::SOAP_Base('Client');
     $this->_endpoint = $endpoint;
     $this->_portName = $portName;
     $this->__proxy_params = $proxy_params;
     // This hack should perhaps be removed as it might cause unexpected
     // behaviour.
     $wsdl = $wsdl ? $wsdl : strtolower(substr($endpoint, -4)) == 'wsdl';
     // make values
     if ($wsdl) {
         $this->__endpointType = 'wsdl';
         // instantiate wsdl class
         $this->_wsdl =& new SOAP_WSDL($this->_endpoint, $this->__proxy_params);
         if ($this->_wsdl->fault) {
             $this->_raiseSoapFault($this->_wsdl->fault);
         }
     }
 }