ILIAS  release_7 Revision v7.30-3-g800a261c036
soap_transport_http Class Reference

transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support More...

+ Inheritance diagram for soap_transport_http:
+ Collaboration diagram for soap_transport_http:

Public Member Functions

 soap_transport_http ($url)
 constructor More...
 
 connect ($connection_timeout=0, $response_timeout=30)
 
 send ($data, $timeout=0, $response_timeout=30)
 send the SOAP message via HTTP More...
 
 sendHTTPS ($data, $timeout=0, $response_timeout=30)
 send the SOAP message via HTTPS 1.0 using CURL More...
 
 setCredentials ($username, $password, $authtype='basic', $digestRequest=array())
 if authenticating, set user credentials here More...
 
 setSOAPAction ($soapaction)
 set the soapaction value More...
 
 setEncoding ($enc='gzip, deflate')
 use http encoding More...
 
 setProxy ($proxyhost, $proxyport, $proxyusername='', $proxypassword='')
 set proxy info here More...
 
 decodeChunked ($buffer, $lb)
 decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6 More...
 
 buildPayload ($data)
 
 sendRequest ($data)
 
 getResponse ()
 
 setContentType ($type, $charset=false)
 
 usePersistentConnection ()
 
 __construct ($url, $curl_options=NULL, $use_curl=false)
 constructor More...
 
 setCurlOption ($option, $value)
 sets a cURL option More...
 
 setHeader ($name, $value)
 sets an HTTP header More...
 
 unsetHeader ($name)
 unsets an HTTP header More...
 
 setURL ($url)
 sets the URL to which to connect More...
 
 io_method ()
 gets the I/O method to use More...
 
 connect ($connection_timeout=0, $response_timeout=30)
 establish an HTTP connection More...
 
 send ($data, $timeout=0, $response_timeout=30, $cookies=NULL)
 sends the SOAP request and gets the SOAP response via HTTP[S] More...
 
 sendHTTPS ($data, $timeout=0, $response_timeout=30, $cookies)
 sends the SOAP request and gets the SOAP response via HTTPS using CURL More...
 
 setCredentials ($username, $password, $authtype='basic', $digestRequest=array(), $certRequest=array())
 if authenticating, set user credentials here More...
 
 setSOAPAction ($soapaction)
 set the soapaction value More...
 
 setEncoding ($enc='gzip, deflate')
 use http encoding More...
 
 setProxy ($proxyhost, $proxyport, $proxyusername='', $proxypassword='', $proxyauthtype='basic')
 set proxy info here More...
 
 isSkippableCurlHeader (&$data)
 Test if the given string starts with a header that is to be skipped. More...
 
 decodeChunked ($buffer, $lb)
 decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6 More...
 
 buildPayload ($data, $cookie_str='')
 Writes the payload, including HTTP headers, to $this->outgoing_payload. More...
 
 sendRequest ($data, $cookies=NULL)
 sends the SOAP request via HTTP[S] More...
 
 getResponse ()
 gets the SOAP response via HTTP[S] More...
 
 setContentType ($type, $charset=false)
 sets the content-type for the SOAP message to be sent More...
 
 usePersistentConnection ()
 specifies that an HTTP persistent connection should be used More...
 
 parseCookie ($cookie_str)
 parse an incoming Cookie into it's parts More...
 
 getCookiesForRequest ($cookies, $secure=false)
 sort out cookies for the current request More...
 
- Public Member Functions inherited from nusoap_base
 debug ($string)
 adds debug data to the class level debug string More...
 
 expandEntities ($val)
 expands entities, e.g. More...
 
 getError ()
 returns error string if present More...
 
 setError ($str)
 sets error string More...
 
 isArraySimpleOrStruct ($val)
 detect if array is a simple array or a struct (associative array) More...
 
 serialize_val ($val, $name=false, $type=false, $name_ns=false, $type_ns=false, $attributes=false, $use='encoded')
 serializes PHP values in accordance w/ section 5. More...
 
 serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded')
 serialize message More...
 
 formatDump ($str)
 
 contractQname ($qname)
 contracts a qualified name More...
 
 expandQname ($qname)
 expands a qualified name More...
 
 getLocalPart ($str)
 returns the local part of a prefixed string returns the original string, if not prefixed More...
 
 getPrefix ($str)
 returns the prefix part of a prefixed string returns false, if not prefixed More...
 
 getNamespaceFromPrefix ($prefix)
 pass it a prefix, it returns a namespace returns false if no namespace registered with the given prefix More...
 
 getPrefixFromNamespace ($ns)
 returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace More...
 
 varDump ($data)
 
 __construct ()
 constructor More...
 
 getGlobalDebugLevel ()
 gets the global debug level, which applies to future instances More...
 
 setGlobalDebugLevel ($level)
 sets the global debug level, which applies to future instances More...
 
 getDebugLevel ()
 gets the debug level for this instance More...
 
 setDebugLevel ($level)
 sets the debug level for this instance More...
 
 debug ($string)
 adds debug data to the instance debug string with formatting More...
 
 appendDebug ($string)
 adds debug data to the instance debug string without formatting More...
 
 clearDebug ()
 clears the current debug data for this instance More...
 
getDebug ()
 gets the current debug data for this instance More...
 
getDebugAsXMLComment ()
 gets the current debug data for this instance as an XML comment this may change the contents of the debug data More...
 
 expandEntities ($val)
 expands entities, e.g. More...
 
 getError ()
 returns error string if present More...
 
 setError ($str)
 sets error string More...
 
 isArraySimpleOrStruct ($val)
 detect if array is a simple array or a struct (associative array) More...
 
 serialize_val ($val, $name=false, $type=false, $name_ns=false, $type_ns=false, $attributes=false, $use='encoded', $soapval=false)
 serializes PHP values in accordance w/ section 5. More...
 
 serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded', $encodingStyle='http://schemas.xmlsoap.org/soap/encoding/')
 serializes a message More...
 
 formatDump ($str)
 formats a string to be inserted into an HTML stream More...
 
 contractQname ($qname)
 contracts (changes namespace to prefix) a qualified name More...
 
 expandQname ($qname)
 expands (changes prefix to namespace) a qualified name More...
 
 getLocalPart ($str)
 returns the local part of a prefixed string returns the original string, if not prefixed More...
 
 getPrefix ($str)
 returns the prefix part of a prefixed string returns false, if not prefixed More...
 
 getNamespaceFromPrefix ($prefix)
 pass it a prefix, it returns a namespace More...
 
 getPrefixFromNamespace ($ns)
 returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace More...
 
 getmicrotime ()
 returns the time in ODBC canonical form with microseconds More...
 
 varDump ($data)
 Returns a string with the output of var_dump. More...
 
 __toString ()
 represents the object as a string More...
 

Data Fields

 $url = ''
 
 $uri = ''
 
 $scheme = ''
 
 $host = ''
 
 $port = ''
 
 $path = ''
 
 $request_method = 'POST'
 
 $protocol_version = '1.0'
 
 $encoding = ''
 
 $outgoing_headers = array()
 
 $incoming_headers = array()
 
 $outgoing_payload = ''
 
 $incoming_payload = ''
 
 $useSOAPAction = true
 
 $persistentConnection = false
 
 $ch = false
 
 $username = ''
 
 $password = ''
 
 $digest_uri = ''
 
 $incoming_cookies = array()
 
 $response_status_line
 
 $ch_options = array()
 
 $use_curl = false
 
 $proxy = null
 
 $authtype = ''
 
 $digestRequest = array()
 
 $certRequest = array()
 
- Data Fields inherited from nusoap_base
 $title = 'NuSOAP'
 
 $version = '0.6.7'
 
 $revision = '$Revision$'
 
 $error_str = false
 
 $debug_str = ''
 
 $charencoding = true
 
 $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'
 
 $soap_defencoding = 'UTF-8'
 
 $namespaces
 
 $usedNamespaces = array()
 
 $typemap
 
 $xmlEntities
 
 $debugLevel
 

Detailed Description

transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support

Author
Dietrich Ayala dietr.nosp@m.ich@.nosp@m.ganx4.nosp@m..com
Version
$Id$ public
Author
Dietrich Ayala dietr.nosp@m.ich@.nosp@m.ganx4.nosp@m..com
Scott Nichol snich.nosp@m.ol@u.nosp@m.sers..nosp@m.sour.nosp@m.cefor.nosp@m.ge.n.nosp@m.et
Version
$Id$ public

Definition at line 1552 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

soap_transport_http::__construct (   $url,
  $curl_options = NULL,
  $use_curl = false 
)

constructor

Parameters
string$urlThe URL to which to connect
array$curl_optionsUser-specified cURL options
boolean$use_curlWhether to try to force cURL use public

Definition at line 2180 of file nusoap.php.

References ILIAS\GlobalScreen\Provider\__construct(), nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

2180  {
2182  $this->debug("ctor url=$url use_curl=$use_curl curl_options:");
2183  $this->appendDebug($this->varDump($curl_options));
2184  $this->setURL($url);
2185  if (is_array($curl_options)) {
2186  $this->ch_options = $curl_options;
2187  }
2188  $this->use_curl = $use_curl;
2189  preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
2190  $this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');
2191  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:298
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
setURL($url)
sets the URL to which to connect
Definition: nusoap.php:2237
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
varDump($data)
Definition: nusoap.php:567
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ buildPayload() [1/2]

soap_transport_http::buildPayload (   $data)

Definition at line 1960 of file nusoap.php.

References $data.

1960  {
1961  // add content-length header
1962  $this->outgoing_headers['Content-Length'] = strlen($data);
1963 
1964  // start building outgoing payload:
1965  $this->outgoing_payload = "$this->request_method $this->uri HTTP/$this->protocol_version\r\n";
1966 
1967  // loop thru headers, serializing
1968  foreach($this->outgoing_headers as $k => $v){
1969  $this->outgoing_payload .= $k.': '.$v."\r\n";
1970  }
1971 
1972  // header/body separator
1973  $this->outgoing_payload .= "\r\n";
1974 
1975  // add data
1976  $this->outgoing_payload .= $data;
1977  }
$data
Definition: storeScorm.php:23

◆ buildPayload() [2/2]

soap_transport_http::buildPayload (   $data,
  $cookie_str = '' 
)

Writes the payload, including HTTP headers, to $this->outgoing_payload.

Parameters
string$dataHTTP body
string$cookie_strdata for HTTP Cookie header
Returns
void private

Definition at line 2808 of file nusoap.php.

References $data, XapiProxy\$req, $url, and nusoap_base\debug().

2808  {
2809  // Note: for cURL connections, $this->outgoing_payload is ignored,
2810  // as is the Content-Length header, but these are still created as
2811  // debugging guides.
2812 
2813  // add content-length header
2814  $this->setHeader('Content-Length', strlen($data));
2815 
2816  // start building outgoing payload:
2817  if ($this->proxy) {
2818  $uri = $this->url;
2819  } else {
2820  $uri = $this->uri;
2821  }
2822  $req = "$this->request_method $uri HTTP/$this->protocol_version";
2823  $this->debug("HTTP request: $req");
2824  $this->outgoing_payload = "$req\r\n";
2825 
2826  // loop thru headers, serializing
2827  foreach($this->outgoing_headers as $k => $v){
2828  $hdr = $k.': '.$v;
2829  $this->debug("HTTP header: $hdr");
2830  $this->outgoing_payload .= "$hdr\r\n";
2831  }
2832 
2833  // add any cookies
2834  if ($cookie_str != '') {
2835  $hdr = 'Cookie: '.$cookie_str;
2836  $this->debug("HTTP header: $hdr");
2837  $this->outgoing_payload .= "$hdr\r\n";
2838  }
2839 
2840  // header/body separator
2841  $this->outgoing_payload .= "\r\n";
2842 
2843  // add data
2844  $this->outgoing_payload .= $data;
2845  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ connect() [1/2]

soap_transport_http::connect (   $connection_timeout = 0,
  $response_timeout = 30 
)

Definition at line 1615 of file nusoap.php.

References nusoap_base\$error_str, $url, nusoap_base\debug(), and nusoap_base\setError().

1615  {
1616  // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
1617  // "regular" socket.
1618  // TODO: disabled for now because OpenSSL must be *compiled* in (not just
1619  // loaded), and until PHP5 stream_get_wrappers is not available.
1620 // if ($this->scheme == 'https') {
1621 // if (version_compare(phpversion(), '4.3.0') >= 0) {
1622 // if (extension_loaded('openssl')) {
1623 // $this->scheme = 'ssl';
1624 // $this->debug('Using SSL over OpenSSL');
1625 // }
1626 // }
1627 // }
1628  $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port");
1629  if ($this->scheme == 'http' || $this->scheme == 'ssl') {
1630  // use persistent connection
1631  if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){
1632  if (!feof($this->fp)) {
1633  $this->debug('Re-use persistent connection');
1634  return true;
1635  }
1636  fclose($this->fp);
1637  $this->debug('Closed persistent connection at EOF');
1638  }
1639 
1640  // munge host if using OpenSSL
1641  if ($this->scheme == 'ssl') {
1642  $host = 'ssl://' . $this->host;
1643  } else {
1644  $host = $this->host;
1645  }
1646  $this->debug('calling fsockopen with host ' . $host);
1647 
1648  // open socket
1649  if($connection_timeout > 0){
1650  $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout);
1651  } else {
1652  $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str);
1653  }
1654 
1655  // test pointer
1656  if(!$this->fp) {
1657  $msg = 'Couldn\'t open socket connection to server ' . $this->url;
1658  if ($this->errno) {
1659  $msg .= ', Error ('.$this->errno.'): '.$this->error_str;
1660  } else {
1661  $msg .= ' prior to connect(). This is often a problem looking up the host name.';
1662  }
1663  $this->debug($msg);
1664  $this->setError($msg);
1665  return false;
1666  }
1667 
1668  // set response timeout
1669  socket_set_timeout( $this->fp, $response_timeout);
1670 
1671  $this->debug('socket connected');
1672  return true;
1673  } else if ($this->scheme == 'https') {
1674  if (!extension_loaded('curl')) {
1675  $this->setError('CURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS');
1676  return false;
1677  }
1678  $this->debug('connect using https');
1679  // init CURL
1680  $this->ch = curl_init();
1681  // set url
1682  $hostURL = ($this->port != '') ? "https://$this->host:$this->port" : "https://$this->host";
1683  // add path
1684  $hostURL .= $this->path;
1685  curl_setopt($this->ch, CURLOPT_URL, $hostURL);
1686  // ask for headers in the response output
1687  curl_setopt($this->ch, CURLOPT_HEADER, 1);
1688  // ask for the response output as the return value
1689  curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
1690  // encode
1691  // We manage this ourselves through headers and encoding
1692 // if(function_exists('gzuncompress')){
1693 // curl_setopt($this->ch, CURLOPT_ENCODING, 'deflate');
1694 // }
1695  // persistent connection
1696  if ($this->persistentConnection) {
1697  // The way we send data, we cannot use persistent connections, since
1698  // there will be some "junk" at the end of our request.
1699  //curl_setopt($this->ch, CURL_HTTP_VERSION_1_1, true);
1700  $this->persistentConnection = false;
1701  $this->outgoing_headers['Connection'] = 'close';
1702  }
1703  // set timeout (NOTE: cURL does not have separate connection and response timeouts)
1704  if ($connection_timeout != 0) {
1705  curl_setopt($this->ch, CURLOPT_TIMEOUT, $connection_timeout);
1706  }
1707 
1708  // recent versions of cURL turn on peer/host checking by default,
1709  // while PHP binaries are not compiled with a default location for the
1710  // CA cert bundle, so disable peer/host checking.
1711 //curl_setopt($this->ch, CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');
1712  curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
1713  curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
1714 
1715  /*
1716  TODO: support client certificates (thanks Tobias Boes)
1717  curl_setopt($this->ch, CURLOPT_CAINFO, '$pathToPemFiles/rootca.pem');
1718  curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 1);
1719  curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 1);
1720  curl_setopt($this->ch, CURLOPT_SSLCERT, '$pathToPemFiles/mycert.pem');
1721  curl_setopt($this->ch, CURLOPT_SSLKEY, '$pathToPemFiles/mykey.pem');
1722  */
1723  $this->debug('cURL connection set up');
1724  return true;
1725  } else {
1726  $this->setError('Unknown scheme ' . $this->scheme);
1727  $this->debug('Unknown scheme ' . $this->scheme);
1728  return false;
1729  }
1730  }
setError($str)
sets error string
Definition: nusoap.php:184
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ connect() [2/2]

soap_transport_http::connect (   $connection_timeout = 0,
  $response_timeout = 30 
)

establish an HTTP connection

Parameters
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
Returns
boolean true if connected, false if not private

Definition at line 2297 of file nusoap.php.

References nusoap_base\$error_str, $url, nusoap_base\appendDebug(), nusoap_base\debug(), nusoap_base\setError(), and nusoap_base\varDump().

2297  {
2298  // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
2299  // "regular" socket.
2300  // TODO: disabled for now because OpenSSL must be *compiled* in (not just
2301  // loaded), and until PHP5 stream_get_wrappers is not available.
2302 // if ($this->scheme == 'https') {
2303 // if (version_compare(phpversion(), '4.3.0') >= 0) {
2304 // if (extension_loaded('openssl')) {
2305 // $this->scheme = 'ssl';
2306 // $this->debug('Using SSL over OpenSSL');
2307 // }
2308 // }
2309 // }
2310  $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port");
2311  if ($this->io_method() == 'socket') {
2312  if (!is_array($this->proxy)) {
2313  $host = $this->host;
2314  $port = $this->port;
2315  } else {
2316  $host = $this->proxy['host'];
2317  $port = $this->proxy['port'];
2318  }
2319 
2320  // use persistent connection
2321  if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){
2322  if (!feof($this->fp)) {
2323  $this->debug('Re-use persistent connection');
2324  return true;
2325  }
2326  fclose($this->fp);
2327  $this->debug('Closed persistent connection at EOF');
2328  }
2329 
2330  // munge host if using OpenSSL
2331  if ($this->scheme == 'ssl') {
2332  $host = 'ssl://' . $host;
2333  }
2334  $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout);
2335 
2336  // open socket
2337  if($connection_timeout > 0){
2338  $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout);
2339  } else {
2340  $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str);
2341  }
2342 
2343  // test pointer
2344  if(!$this->fp) {
2345  $msg = 'Couldn\'t open socket connection to server ' . $this->url;
2346  if ($this->errno) {
2347  $msg .= ', Error ('.$this->errno.'): '.$this->error_str;
2348  } else {
2349  $msg .= ' prior to connect(). This is often a problem looking up the host name.';
2350  }
2351  $this->debug($msg);
2352  $this->setError($msg);
2353  return false;
2354  }
2355 
2356  // set response timeout
2357  $this->debug('set response timeout to ' . $response_timeout);
2358  socket_set_timeout( $this->fp, $response_timeout);
2359 
2360  $this->debug('socket connected');
2361  return true;
2362  } else if ($this->io_method() == 'curl') {
2363  if (!extension_loaded('curl')) {
2364 // $this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS');
2365  $this->setError('The PHP cURL Extension is required for HTTPS or NLTM. You will need to re-build or update your PHP to included cURL.');
2366  return false;
2367  }
2368  // Avoid warnings when PHP does not have these options
2369  if (defined('CURLOPT_CONNECTIONTIMEOUT'))
2370  $CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT;
2371  else
2372  $CURLOPT_CONNECTIONTIMEOUT = 78;
2373  if (defined('CURLOPT_HTTPAUTH'))
2374  $CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH;
2375  else
2376  $CURLOPT_HTTPAUTH = 107;
2377  if (defined('CURLOPT_PROXYAUTH'))
2378  $CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH;
2379  else
2380  $CURLOPT_PROXYAUTH = 111;
2381  if (defined('CURLAUTH_BASIC'))
2382  $CURLAUTH_BASIC = CURLAUTH_BASIC;
2383  else
2384  $CURLAUTH_BASIC = 1;
2385  if (defined('CURLAUTH_DIGEST'))
2386  $CURLAUTH_DIGEST = CURLAUTH_DIGEST;
2387  else
2388  $CURLAUTH_DIGEST = 2;
2389  if (defined('CURLAUTH_NTLM'))
2390  $CURLAUTH_NTLM = CURLAUTH_NTLM;
2391  else
2392  $CURLAUTH_NTLM = 8;
2393 
2394  $this->debug('connect using cURL');
2395  // init CURL
2396  $this->ch = curl_init();
2397  // set url
2398  $hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host";
2399  // add path
2400  $hostURL .= $this->path;
2401  $this->setCurlOption(CURLOPT_URL, $hostURL);
2402  // follow location headers (re-directs)
2403  if (ini_get('safe_mode') || ini_get('open_basedir')) {
2404  $this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION');
2405  $this->debug('safe_mode = ');
2406  $this->appendDebug($this->varDump(ini_get('safe_mode')));
2407  $this->debug('open_basedir = ');
2408  $this->appendDebug($this->varDump(ini_get('open_basedir')));
2409  } else {
2410  $this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1);
2411  }
2412  // ask for headers in the response output
2413  $this->setCurlOption(CURLOPT_HEADER, 1);
2414  // ask for the response output as the return value
2415  $this->setCurlOption(CURLOPT_RETURNTRANSFER, 1);
2416  // encode
2417  // We manage this ourselves through headers and encoding
2418 // if(function_exists('gzuncompress')){
2419 // $this->setCurlOption(CURLOPT_ENCODING, 'deflate');
2420 // }
2421  // persistent connection
2422  if ($this->persistentConnection) {
2423  // I believe the following comment is now bogus, having applied to
2424  // the code when it used CURLOPT_CUSTOMREQUEST to send the request.
2425  // The way we send data, we cannot use persistent connections, since
2426  // there will be some "junk" at the end of our request.
2427  //$this->setCurlOption(CURL_HTTP_VERSION_1_1, true);
2428  $this->persistentConnection = false;
2429  $this->setHeader('Connection', 'close');
2430  }
2431  // set timeouts
2432  if ($connection_timeout != 0) {
2433  $this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout);
2434  }
2435  if ($response_timeout != 0) {
2436  $this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout);
2437  }
2438 
2439  if ($this->scheme == 'https') {
2440  $this->debug('set cURL SSL verify options');
2441  // recent versions of cURL turn on peer/host checking by default,
2442  // while PHP binaries are not compiled with a default location for the
2443  // CA cert bundle, so disable peer/host checking.
2444  //$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');
2445  $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
2446  $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);
2447 
2448  // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo)
2449  if ($this->authtype == 'certificate') {
2450  $this->debug('set cURL certificate options');
2451  if (isset($this->certRequest['cainfofile'])) {
2452  $this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']);
2453  }
2454  if (isset($this->certRequest['verifypeer'])) {
2455  $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']);
2456  } else {
2457  $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1);
2458  }
2459  if (isset($this->certRequest['verifyhost'])) {
2460  $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']);
2461  } else {
2462  $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1);
2463  }
2464  if (isset($this->certRequest['sslcertfile'])) {
2465  $this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']);
2466  }
2467  if (isset($this->certRequest['sslkeyfile'])) {
2468  $this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']);
2469  }
2470  if (isset($this->certRequest['passphrase'])) {
2471  $this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']);
2472  }
2473  if (isset($this->certRequest['certpassword'])) {
2474  $this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']);
2475  }
2476  }
2477  }
2478  if ($this->authtype && ($this->authtype != 'certificate')) {
2479  if ($this->username) {
2480  $this->debug('set cURL username/password');
2481  $this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password");
2482  }
2483  if ($this->authtype == 'basic') {
2484  $this->debug('set cURL for Basic authentication');
2485  $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC);
2486  }
2487  if ($this->authtype == 'digest') {
2488  $this->debug('set cURL for digest authentication');
2489  $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST);
2490  }
2491  if ($this->authtype == 'ntlm') {
2492  $this->debug('set cURL for NTLM authentication');
2493  $this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM);
2494  }
2495  }
2496  if (is_array($this->proxy)) {
2497  $this->debug('set cURL proxy options');
2498  if ($this->proxy['port'] != '') {
2499  $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']);
2500  } else {
2501  $this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']);
2502  }
2503  if ($this->proxy['username'] || $this->proxy['password']) {
2504  $this->debug('set cURL proxy authentication options');
2505  $this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']);
2506  if ($this->proxy['authtype'] == 'basic') {
2507  $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC);
2508  }
2509  if ($this->proxy['authtype'] == 'ntlm') {
2510  $this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM);
2511  }
2512  }
2513  }
2514  $this->debug('cURL connection set up');
2515  return true;
2516  } else {
2517  $this->setError('Unknown scheme ' . $this->scheme);
2518  $this->debug('Unknown scheme ' . $this->scheme);
2519  return false;
2520  }
2521  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:298
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
setError($str)
sets error string
Definition: nusoap.php:184
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
setCurlOption($option, $value)
sets a cURL option
Definition: nusoap.php:2200
varDump($data)
Definition: nusoap.php:567
io_method()
gets the I/O method to use
Definition: nusoap.php:2281
+ Here is the call graph for this function:

◆ decodeChunked() [1/2]

soap_transport_http::decodeChunked (   $buffer,
  $lb 
)

decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6

Parameters
string$buffer
string$lb
Returns
string public

Definition at line 1908 of file nusoap.php.

References nusoap_base\debug().

1908  {
1909  // length := 0
1910  $length = 0;
1911  $new = '';
1912 
1913  // read chunk-size, chunk-extension (if any) and CRLF
1914  // get the position of the linebreak
1915  $chunkend = strpos($buffer, $lb);
1916  if ($chunkend == FALSE) {
1917  $this->debug('no linebreak found in decodeChunked');
1918  return $new;
1919  }
1920  $temp = substr($buffer,0,$chunkend);
1921  $chunk_size = hexdec( trim($temp) );
1922  $chunkstart = $chunkend + strlen($lb);
1923  // while (chunk-size > 0) {
1924  while ($chunk_size > 0) {
1925  $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size");
1926  $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size);
1927 
1928  // Just in case we got a broken connection
1929  if ($chunkend == FALSE) {
1930  $chunk = substr($buffer,$chunkstart);
1931  // append chunk-data to entity-body
1932  $new .= $chunk;
1933  $length += strlen($chunk);
1934  break;
1935  }
1936 
1937  // read chunk-data and CRLF
1938  $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart);
1939  // append chunk-data to entity-body
1940  $new .= $chunk;
1941  // length := length + chunk-size
1942  $length += strlen($chunk);
1943  // read chunk-size and CRLF
1944  $chunkstart = $chunkend + strlen($lb);
1945 
1946  $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
1947  if ($chunkend == FALSE) {
1948  break; //Just in case we got a broken connection
1949  }
1950  $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart);
1951  $chunk_size = hexdec( trim($temp) );
1952  $chunkstart = $chunkend;
1953  }
1954  return $new;
1955  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ decodeChunked() [2/2]

soap_transport_http::decodeChunked (   $buffer,
  $lb 
)

decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6

Parameters
string$buffer
string$lb
Returns
string public
Deprecated:

Definition at line 2751 of file nusoap.php.

References nusoap_base\debug().

2751  {
2752  // length := 0
2753  $length = 0;
2754  $new = '';
2755 
2756  // read chunk-size, chunk-extension (if any) and CRLF
2757  // get the position of the linebreak
2758  $chunkend = strpos($buffer, $lb);
2759  if ($chunkend == FALSE) {
2760  $this->debug('no linebreak found in decodeChunked');
2761  return $new;
2762  }
2763  $temp = substr($buffer,0,$chunkend);
2764  $chunk_size = hexdec( trim($temp) );
2765  $chunkstart = $chunkend + strlen($lb);
2766  // while (chunk-size > 0) {
2767  while ($chunk_size > 0) {
2768  $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size");
2769  $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size);
2770 
2771  // Just in case we got a broken connection
2772  if ($chunkend == FALSE) {
2773  $chunk = substr($buffer,$chunkstart);
2774  // append chunk-data to entity-body
2775  $new .= $chunk;
2776  $length += strlen($chunk);
2777  break;
2778  }
2779 
2780  // read chunk-data and CRLF
2781  $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart);
2782  // append chunk-data to entity-body
2783  $new .= $chunk;
2784  // length := length + chunk-size
2785  $length += strlen($chunk);
2786  // read chunk-size and CRLF
2787  $chunkstart = $chunkend + strlen($lb);
2788 
2789  $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
2790  if ($chunkend == FALSE) {
2791  break; //Just in case we got a broken connection
2792  }
2793  $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart);
2794  $chunk_size = hexdec( trim($temp) );
2795  $chunkstart = $chunkend;
2796  }
2797  return $new;
2798  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ getCookiesForRequest()

soap_transport_http::getCookiesForRequest (   $cookies,
  $secure = false 
)

sort out cookies for the current request

Parameters
array$cookiesarray with all cookies
boolean$secureis the send-content secure or not?
Returns
string for Cookie-HTTP-Header private

Definition at line 3384 of file nusoap.php.

References nusoap_base\debug().

3384  {
3385  $cookie_str = '';
3386  if ((! is_null($cookies)) && (is_array($cookies))) {
3387  foreach ($cookies as $cookie) {
3388  if (! is_array($cookie)) {
3389  continue;
3390  }
3391  $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']);
3392  if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
3393  if (strtotime($cookie['expires']) <= time()) {
3394  $this->debug('cookie has expired');
3395  continue;
3396  }
3397  }
3398  if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) {
3399  $domain = preg_quote($cookie['domain']);
3400  if (! preg_match("'.*$domain$'i", $this->host)) {
3401  $this->debug('cookie has different domain');
3402  continue;
3403  }
3404  }
3405  if ((isset($cookie['path'])) && (! empty($cookie['path']))) {
3406  $path = preg_quote($cookie['path']);
3407  if (! preg_match("'^$path.*'i", $this->path)) {
3408  $this->debug('cookie is for a different path');
3409  continue;
3410  }
3411  }
3412  if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) {
3413  $this->debug('cookie is secure, transport is not');
3414  continue;
3415  }
3416  $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; ';
3417  $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']);
3418  }
3419  }
3420  return $cookie_str;
3421  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ getResponse() [1/2]

soap_transport_http::getResponse ( )

Definition at line 2012 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

2012  {
2013  $this->incoming_payload = '';
2014 
2015  if ($this->scheme == 'http' || $this->scheme == 'ssl') {
2016  // loop until headers have been retrieved
2017  $data = '';
2018  while (!isset($lb)){
2019 
2020  // We might EOF during header read.
2021  if(feof($this->fp)) {
2022  $this->incoming_payload = $data;
2023  $this->debug('found no headers before EOF after length ' . strlen($data));
2024  $this->debug("received before EOF:\n" . $data);
2025  $this->setError('server failed to send headers');
2026  return false;
2027  }
2028 
2029  $tmp = fgets($this->fp, 256);
2030  $tmplen = strlen($tmp);
2031  $this->debug("read line of $tmplen bytes: " . trim($tmp));
2032 
2033  if ($tmplen == 0) {
2034  $this->incoming_payload = $data;
2035  $this->debug('socket read of headers timed out after length ' . strlen($data));
2036  $this->debug("read before timeout:\n" . $data);
2037  $this->setError('socket read of headers timed out');
2038  return false;
2039  }
2040 
2041  $data .= $tmp;
2042  $pos = strpos($data,"\r\n\r\n");
2043  if($pos > 1){
2044  $lb = "\r\n";
2045  } else {
2046  $pos = strpos($data,"\n\n");
2047  if($pos > 1){
2048  $lb = "\n";
2049  }
2050  }
2051  // remove 100 header
2052  if(isset($lb) && ereg('^HTTP/1.1 100',$data)){
2053  unset($lb);
2054  $data = '';
2055  }//
2056  }
2057  // store header data
2058  $this->incoming_payload .= $data;
2059  $this->debug('found end of headers after length ' . strlen($data));
2060  // process headers
2061  $header_data = trim(substr($data,0,$pos));
2062  $header_array = explode($lb,$header_data);
2063  $this->incoming_headers = array();
2064  foreach($header_array as $header_line){
2065  $arr = explode(':',$header_line, 2);
2066  if(count($arr) > 1){
2067  $header_name = strtolower(trim($arr[0]));
2068  $this->incoming_headers[$header_name] = trim($arr[1]);
2069  } else if (isset($header_name)) {
2070  $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
2071  }
2072  }
2073 
2074  // loop until msg has been received
2075  if (isset($this->incoming_headers['content-length'])) {
2076  $content_length = $this->incoming_headers['content-length'];
2077  $chunked = false;
2078  $this->debug("want to read content of length $content_length");
2079  } else {
2080  $content_length = 2147483647;
2081  if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') {
2082  $chunked = true;
2083  $this->debug("want to read chunked content");
2084  } else {
2085  $chunked = false;
2086  $this->debug("want to read content to EOF");
2087  }
2088  }
2089  $data = '';
2090  do {
2091  if ($chunked) {
2092  $tmp = fgets($this->fp, 256);
2093  $tmplen = strlen($tmp);
2094  $this->debug("read chunk line of $tmplen bytes");
2095  if ($tmplen == 0) {
2096  $this->incoming_payload = $data;
2097  $this->debug('socket read of chunk length timed out after length ' . strlen($data));
2098  $this->debug("read before timeout:\n" . $data);
2099  $this->setError('socket read of chunk length timed out');
2100  return false;
2101  }
2102  $content_length = hexdec(trim($tmp));
2103  $this->debug("chunk length $content_length");
2104  }
2105  $strlen = 0;
2106  while (($strlen < $content_length) && (!feof($this->fp))) {
2107  $readlen = min(8192, $content_length - $strlen);
2108  $tmp = fread($this->fp, $readlen);
2109  $tmplen = strlen($tmp);
2110  $this->debug("read buffer of $tmplen bytes");
2111  if (($tmplen == 0) && (!feof($this->fp))) {
2112  $this->incoming_payload = $data;
2113  $this->debug('socket read of body timed out after length ' . strlen($data));
2114  $this->debug("read before timeout:\n" . $data);
2115  $this->setError('socket read of body timed out');
2116  return false;
2117  }
2118  $strlen += $tmplen;
2119  $data .= $tmp;
2120  }
2121  if ($chunked && ($content_length > 0)) {
2122  $tmp = fgets($this->fp, 256);
2123  $tmplen = strlen($tmp);
2124  $this->debug("read chunk terminator of $tmplen bytes");
2125  if ($tmplen == 0) {
2126  $this->incoming_payload = $data;
2127  $this->debug('socket read of chunk terminator timed out after length ' . strlen($data));
2128  $this->debug("read before timeout:\n" . $data);
2129  $this->setError('socket read of chunk terminator timed out');
2130  return false;
2131  }
2132  }
2133  } while ($chunked && ($content_length > 0) && (!feof($this->fp)));
2134  if (feof($this->fp)) {
2135  $this->debug('read to EOF');
2136  }
2137  $this->debug('read body of length ' . strlen($data));
2138  $this->incoming_payload .= $data;
2139  $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server');
2140 
2141  // close filepointer
2142  if(
2143  (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') ||
2144  (! $this->persistentConnection) || feof($this->fp)){
2145  fclose($this->fp);
2146  $this->fp = false;
2147  $this->debug('closed socket');
2148  }
2149 
2150  // connection was closed unexpectedly
2151  if($this->incoming_payload == ''){
2152  $this->setError('no response from server');
2153  return false;
2154  }
2155 
2156  // decode transfer-encoding
2157 // if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){
2158 // if(!$data = $this->decodeChunked($data, $lb)){
2159 // $this->setError('Decoding of chunked data failed');
2160 // return false;
2161 // }
2162  //print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>";
2163  // set decoded payload
2164 // $this->incoming_payload = $header_data.$lb.$lb.$data;
2165 // }
2166 
2167  } else if ($this->scheme == 'https') {
2168  // send and receive
2169  $this->debug('send and receive with cURL');
2170  $this->incoming_payload = curl_exec($this->ch);
2172 
2173  $cErr = curl_error($this->ch);
2174  if ($cErr != '') {
2175  $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>';
2176  foreach(curl_getinfo($this->ch) as $k => $v){
2177  $err .= "$k: $v<br>";
2178  }
2179  $this->debug($err);
2180  $this->setError($err);
2181  curl_close($this->ch);
2182  return false;
2183  } else {
2184  //echo '<pre>';
2185  //var_dump(curl_getinfo($this->ch));
2186  //echo '</pre>';
2187  }
2188  // close curl
2189  $this->debug('No cURL error, closing cURL');
2190  curl_close($this->ch);
2191 
2192  // remove 100 header
2193  if (ereg('^HTTP/1.1 100',$data)) {
2194  if ($pos = strpos($data,"\r\n\r\n")) {
2195  $data = ltrim(substr($data,$pos));
2196  } elseif($pos = strpos($data,"\n\n") ) {
2197  $data = ltrim(substr($data,$pos));
2198  }
2199  }
2200 
2201  // separate content from HTTP headers
2202  if ($pos = strpos($data,"\r\n\r\n")) {
2203  $lb = "\r\n";
2204  } elseif( $pos = strpos($data,"\n\n")) {
2205  $lb = "\n";
2206  } else {
2207  $this->debug('no proper separation of headers and document');
2208  $this->setError('no proper separation of headers and document');
2209  return false;
2210  }
2211  $header_data = trim(substr($data,0,$pos));
2212  $header_array = explode($lb,$header_data);
2213  $data = ltrim(substr($data,$pos));
2214  $this->debug('found proper separation of headers and document');
2215  $this->debug('cleaned data, stringlen: '.strlen($data));
2216  // clean headers
2217  foreach ($header_array as $header_line) {
2218  $arr = explode(':',$header_line,2);
2219  if (count($arr) > 1) {
2220  $this->incoming_headers[strtolower(trim($arr[0]))] = trim($arr[1]);
2221  }
2222  }
2223  }
2224 
2225  // see if we need to resend the request with http digest authentication
2226  if (isset($this->incoming_headers['www-authenticate']) && strstr($header_array[0], '401 Unauthorized')) {
2227  $this->debug('Got 401 Unauthorized with WWW-Authenticate: ' . $this->incoming_headers['www-authenticate']);
2228  if (substr("Digest ", $this->incoming_headers['www-authenticate'])) {
2229  $this->debug('Server wants digest authentication');
2230  // remove "Digest " from our elements
2231  $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']);
2232 
2233  // parse elements into array
2234  $digestElements = explode(',', $digestString);
2235  foreach ($digestElements as $val) {
2236  $tempElement = explode('=', trim($val));
2237  $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]);
2238  }
2239 
2240  // should have (at least) qop, realm, nonce
2241  if (isset($digestRequest['nonce'])) {
2242  $this->setCredentials($this->username, $this->password, 'digest', $digestRequest);
2243  $this->tryagain = true;
2244  return false;
2245  }
2246  }
2247  $this->debug('HTTP authentication failed');
2248  $this->setError('HTTP authentication failed');
2249  return false;
2250  }
2251 
2252  // decode content-encoding
2253  if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){
2254  if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){
2255  // if decoding works, use it. else assume data wasn't gzencoded
2256  if(function_exists('gzuncompress')){
2257  //$timer->setMarker('starting decoding of gzip/deflated content');
2258  if($this->incoming_headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)){
2259  $data = $degzdata;
2260  } elseif($this->incoming_headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))){ // do our best
2261  $data = $degzdata;
2262  } else {
2263  $this->setError('Errors occurred when trying to decode the data');
2264  }
2265  //$timer->setMarker('finished decoding of gzip/deflated content');
2266  //print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>";
2267  // set decoded payload
2268  $this->incoming_payload = $header_data.$lb.$lb.$data;
2269  } else {
2270  $this->setError('The server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
2271  }
2272  }
2273  }
2274 
2275  if(strlen($data) == 0){
2276  $this->debug('no data after headers!');
2277  $this->setError('no data present after HTTP headers');
2278  return false;
2279  }
2280 
2281  return $data;
2282  }
setError($str)
sets error string
Definition: nusoap.php:184
setCredentials($username, $password, $authtype='basic', $digestRequest=array())
if authenticating, set user credentials here
Definition: nusoap.php:1793
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ getResponse() [2/2]

soap_transport_http::getResponse ( )

gets the SOAP response via HTTP[S]

Returns
string the response (also sets member variables like incoming_payload) private

Definition at line 2912 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

2912  {
2913  $this->incoming_payload = '';
2914 
2915  if ($this->io_method() == 'socket') {
2916  // loop until headers have been retrieved
2917  $data = '';
2918  while (!isset($lb)){
2919 
2920  // We might EOF during header read.
2921  if(feof($this->fp)) {
2922  $this->incoming_payload = $data;
2923  $this->debug('found no headers before EOF after length ' . strlen($data));
2924  $this->debug("received before EOF:\n" . $data);
2925  $this->setError('server failed to send headers');
2926  return false;
2927  }
2928 
2929  $tmp = fgets($this->fp, 256);
2930  $tmplen = strlen($tmp);
2931  $this->debug("read line of $tmplen bytes: " . trim($tmp));
2932 
2933  if ($tmplen == 0) {
2934  $this->incoming_payload = $data;
2935  $this->debug('socket read of headers timed out after length ' . strlen($data));
2936  $this->debug("read before timeout: " . $data);
2937  $this->setError('socket read of headers timed out');
2938  return false;
2939  }
2940 
2941  $data .= $tmp;
2942  $pos = strpos($data,"\r\n\r\n");
2943  if($pos > 1){
2944  $lb = "\r\n";
2945  } else {
2946  $pos = strpos($data,"\n\n");
2947  if($pos > 1){
2948  $lb = "\n";
2949  }
2950  }
2951  // remove 100 headers
2952  if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) {
2953  unset($lb);
2954  $data = '';
2955  }//
2956  }
2957  // store header data
2958  $this->incoming_payload .= $data;
2959  $this->debug('found end of headers after length ' . strlen($data));
2960  // process headers
2961  $header_data = trim(substr($data,0,$pos));
2962  $header_array = explode($lb,$header_data);
2963  $this->incoming_headers = array();
2964  $this->incoming_cookies = array();
2965  foreach($header_array as $header_line){
2966  $arr = explode(':',$header_line, 2);
2967  if(count($arr) > 1){
2968  $header_name = strtolower(trim($arr[0]));
2969  $this->incoming_headers[$header_name] = trim($arr[1]);
2970  if ($header_name == 'set-cookie') {
2971  // TODO: allow multiple cookies from parseCookie
2972  $cookie = $this->parseCookie(trim($arr[1]));
2973  if ($cookie) {
2974  $this->incoming_cookies[] = $cookie;
2975  $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']);
2976  } else {
2977  $this->debug('did not find cookie in ' . trim($arr[1]));
2978  }
2979  }
2980  } else if (isset($header_name)) {
2981  // append continuation line to previous header
2982  $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
2983  }
2984  }
2985 
2986  // loop until msg has been received
2987  if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') {
2988  $content_length = 2147483647; // ignore any content-length header
2989  $chunked = true;
2990  $this->debug("want to read chunked content");
2991  } elseif (isset($this->incoming_headers['content-length'])) {
2992  $content_length = $this->incoming_headers['content-length'];
2993  $chunked = false;
2994  $this->debug("want to read content of length $content_length");
2995  } else {
2996  $content_length = 2147483647;
2997  $chunked = false;
2998  $this->debug("want to read content to EOF");
2999  }
3000  $data = '';
3001  do {
3002  if ($chunked) {
3003  $tmp = fgets($this->fp, 256);
3004  $tmplen = strlen($tmp);
3005  $this->debug("read chunk line of $tmplen bytes");
3006  if ($tmplen == 0) {
3007  $this->incoming_payload = $data;
3008  $this->debug('socket read of chunk length timed out after length ' . strlen($data));
3009  $this->debug("read before timeout:\n" . $data);
3010  $this->setError('socket read of chunk length timed out');
3011  return false;
3012  }
3013  $content_length = hexdec(trim($tmp));
3014  $this->debug("chunk length $content_length");
3015  }
3016  $strlen = 0;
3017  while (($strlen < $content_length) && (!feof($this->fp))) {
3018  $readlen = min(8192, $content_length - $strlen);
3019  $tmp = fread($this->fp, $readlen);
3020  $tmplen = strlen($tmp);
3021  $this->debug("read buffer of $tmplen bytes");
3022  if (($tmplen == 0) && (!feof($this->fp))) {
3023  $this->incoming_payload = $data;
3024  $this->debug('socket read of body timed out after length ' . strlen($data));
3025  $this->debug("read before timeout:\n" . $data);
3026  $this->setError('socket read of body timed out');
3027  return false;
3028  }
3029  $strlen += $tmplen;
3030  $data .= $tmp;
3031  }
3032  if ($chunked && ($content_length > 0)) {
3033  $tmp = fgets($this->fp, 256);
3034  $tmplen = strlen($tmp);
3035  $this->debug("read chunk terminator of $tmplen bytes");
3036  if ($tmplen == 0) {
3037  $this->incoming_payload = $data;
3038  $this->debug('socket read of chunk terminator timed out after length ' . strlen($data));
3039  $this->debug("read before timeout:\n" . $data);
3040  $this->setError('socket read of chunk terminator timed out');
3041  return false;
3042  }
3043  }
3044  } while ($chunked && ($content_length > 0) && (!feof($this->fp)));
3045  if (feof($this->fp)) {
3046  $this->debug('read to EOF');
3047  }
3048  $this->debug('read body of length ' . strlen($data));
3049  $this->incoming_payload .= $data;
3050  $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server');
3051 
3052  // close filepointer
3053  if(
3054  (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') ||
3055  (! $this->persistentConnection) || feof($this->fp)){
3056  fclose($this->fp);
3057  $this->fp = false;
3058  $this->debug('closed socket');
3059  }
3060 
3061  // connection was closed unexpectedly
3062  if($this->incoming_payload == ''){
3063  $this->setError('no response from server');
3064  return false;
3065  }
3066 
3067  // decode transfer-encoding
3068 // if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){
3069 // if(!$data = $this->decodeChunked($data, $lb)){
3070 // $this->setError('Decoding of chunked data failed');
3071 // return false;
3072 // }
3073  //print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>";
3074  // set decoded payload
3075 // $this->incoming_payload = $header_data.$lb.$lb.$data;
3076 // }
3077 
3078  } else if ($this->io_method() == 'curl') {
3079  // send and receive
3080  $this->debug('send and receive with cURL');
3081  $this->incoming_payload = curl_exec($this->ch);
3083 
3084  $cErr = curl_error($this->ch);
3085  if ($cErr != '') {
3086  $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>';
3087  // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE
3088  foreach(curl_getinfo($this->ch) as $k => $v){
3089  $err .= "$k: $v<br>";
3090  }
3091  $this->debug($err);
3092  $this->setError($err);
3093  curl_close($this->ch);
3094  return false;
3095  } else {
3096  //echo '<pre>';
3097  //var_dump(curl_getinfo($this->ch));
3098  //echo '</pre>';
3099  }
3100  // close curl
3101  $this->debug('No cURL error, closing cURL');
3102  curl_close($this->ch);
3103 
3104  // try removing skippable headers
3105  $savedata = $data;
3106  while ($this->isSkippableCurlHeader($data)) {
3107  $this->debug("Found HTTP header to skip");
3108  if ($pos = strpos($data,"\r\n\r\n")) {
3109  $data = ltrim(substr($data,$pos));
3110  } elseif($pos = strpos($data,"\n\n") ) {
3111  $data = ltrim(substr($data,$pos));
3112  }
3113  }
3114 
3115  if ($data == '') {
3116  // have nothing left; just remove 100 header(s)
3117  $data = $savedata;
3118  while (preg_match('/^HTTP\/1.1 100/',$data)) {
3119  if ($pos = strpos($data,"\r\n\r\n")) {
3120  $data = ltrim(substr($data,$pos));
3121  } elseif($pos = strpos($data,"\n\n") ) {
3122  $data = ltrim(substr($data,$pos));
3123  }
3124  }
3125  }
3126 
3127  // separate content from HTTP headers
3128  if ($pos = strpos($data,"\r\n\r\n")) {
3129  $lb = "\r\n";
3130  } elseif( $pos = strpos($data,"\n\n")) {
3131  $lb = "\n";
3132  } else {
3133  $this->debug('no proper separation of headers and document');
3134  $this->setError('no proper separation of headers and document');
3135  return false;
3136  }
3137  $header_data = trim(substr($data,0,$pos));
3138  $header_array = explode($lb,$header_data);
3139  $data = ltrim(substr($data,$pos));
3140  $this->debug('found proper separation of headers and document');
3141  $this->debug('cleaned data, stringlen: '.strlen($data));
3142  // clean headers
3143  foreach ($header_array as $header_line) {
3144  $arr = explode(':',$header_line,2);
3145  if(count($arr) > 1){
3146  $header_name = strtolower(trim($arr[0]));
3147  $this->incoming_headers[$header_name] = trim($arr[1]);
3148  if ($header_name == 'set-cookie') {
3149  // TODO: allow multiple cookies from parseCookie
3150  $cookie = $this->parseCookie(trim($arr[1]));
3151  if ($cookie) {
3152  $this->incoming_cookies[] = $cookie;
3153  $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']);
3154  } else {
3155  $this->debug('did not find cookie in ' . trim($arr[1]));
3156  }
3157  }
3158  } else if (isset($header_name)) {
3159  // append continuation line to previous header
3160  $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
3161  }
3162  }
3163  }
3164 
3165  $this->response_status_line = $header_array[0];
3166  $arr = explode(' ', $this->response_status_line, 3);
3167  $http_version = $arr[0];
3168  $http_status = intval($arr[1]);
3169  $http_reason = count($arr) > 2 ? $arr[2] : '';
3170 
3171  // see if we need to resend the request with http digest authentication
3172  if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) {
3173  $this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']);
3174  $this->setURL($this->incoming_headers['location']);
3175  $this->tryagain = true;
3176  return false;
3177  }
3178 
3179  // see if we need to resend the request with http digest authentication
3180  if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) {
3181  $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']);
3182  if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) {
3183  $this->debug('Server wants digest authentication');
3184  // remove "Digest " from our elements
3185  $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']);
3186 
3187  // parse elements into array
3188  $digestElements = explode(',', $digestString);
3189  foreach ($digestElements as $val) {
3190  $tempElement = explode('=', trim($val), 2);
3191  $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]);
3192  }
3193 
3194  // should have (at least) qop, realm, nonce
3195  if (isset($digestRequest['nonce'])) {
3196  $this->setCredentials($this->username, $this->password, 'digest', $digestRequest);
3197  $this->tryagain = true;
3198  return false;
3199  }
3200  }
3201  $this->debug('HTTP authentication failed');
3202  $this->setError('HTTP authentication failed');
3203  return false;
3204  }
3205 
3206  if (
3207  ($http_status >= 300 && $http_status <= 307) ||
3208  ($http_status >= 400 && $http_status <= 417) ||
3209  ($http_status >= 501 && $http_status <= 505)
3210  ) {
3211  $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)");
3212  return false;
3213  }
3214 
3215  // decode content-encoding
3216  if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){
3217  if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){
3218  // if decoding works, use it. else assume data wasn't gzencoded
3219  if(function_exists('gzinflate')){
3220  //$timer->setMarker('starting decoding of gzip/deflated content');
3221  // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress)
3222  // this means there are no Zlib headers, although there should be
3223  $this->debug('The gzinflate function exists');
3224  $datalen = strlen($data);
3225  if ($this->incoming_headers['content-encoding'] == 'deflate') {
3226  if ($degzdata = @gzinflate($data)) {
3227  $data = $degzdata;
3228  $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes');
3229  if (strlen($data) < $datalen) {
3230  // test for the case that the payload has been compressed twice
3231  $this->debug('The inflated payload is smaller than the gzipped one; try again');
3232  if ($degzdata = @gzinflate($data)) {
3233  $data = $degzdata;
3234  $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes');
3235  }
3236  }
3237  } else {
3238  $this->debug('Error using gzinflate to inflate the payload');
3239  $this->setError('Error using gzinflate to inflate the payload');
3240  }
3241  } elseif ($this->incoming_headers['content-encoding'] == 'gzip') {
3242  if ($degzdata = @gzinflate(substr($data, 10))) { // do our best
3243  $data = $degzdata;
3244  $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes');
3245  if (strlen($data) < $datalen) {
3246  // test for the case that the payload has been compressed twice
3247  $this->debug('The un-gzipped payload is smaller than the gzipped one; try again');
3248  if ($degzdata = @gzinflate(substr($data, 10))) {
3249  $data = $degzdata;
3250  $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes');
3251  }
3252  }
3253  } else {
3254  $this->debug('Error using gzinflate to un-gzip the payload');
3255  $this->setError('Error using gzinflate to un-gzip the payload');
3256  }
3257  }
3258  //$timer->setMarker('finished decoding of gzip/deflated content');
3259  //print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>";
3260  // set decoded payload
3261  $this->incoming_payload = $header_data.$lb.$lb.$data;
3262  } else {
3263  $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.');
3264  $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.');
3265  }
3266  } else {
3267  $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']);
3268  $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']);
3269  }
3270  } else {
3271  $this->debug('No Content-Encoding header');
3272  }
3273 
3274  if(strlen($data) == 0){
3275  $this->debug('no data after headers!');
3276  $this->setError('no data present after HTTP headers');
3277  return false;
3278  }
3279 
3280  return $data;
3281  }
setError($str)
sets error string
Definition: nusoap.php:184
setCredentials($username, $password, $authtype='basic', $digestRequest=array())
if authenticating, set user credentials here
Definition: nusoap.php:1793
$data
Definition: storeScorm.php:23
setURL($url)
sets the URL to which to connect
Definition: nusoap.php:2237
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
isSkippableCurlHeader(&$data)
Test if the given string starts with a header that is to be skipped.
Definition: nusoap.php:2724
parseCookie($cookie_str)
parse an incoming Cookie into it&#39;s parts
Definition: nusoap.php:3320
io_method()
gets the I/O method to use
Definition: nusoap.php:2281
+ Here is the call graph for this function:

◆ io_method()

soap_transport_http::io_method ( )

gets the I/O method to use

Returns
string I/O method to use (socket|curl|unknown) private

Definition at line 2281 of file nusoap.php.

2281  {
2282  if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm'))
2283  return 'curl';
2284  if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm'))
2285  return 'socket';
2286  return 'unknown';
2287  }

◆ isSkippableCurlHeader()

soap_transport_http::isSkippableCurlHeader ( $data)

Test if the given string starts with a header that is to be skipped.

Skippable headers result from chunked transfer and proxy requests.

Parameters
string$dataThe string to check.
Returns
boolean Whether a skippable header was found. private

Definition at line 2724 of file nusoap.php.

References $data.

2724  {
2725  $skipHeaders = array( 'HTTP/1.1 100',
2726  'HTTP/1.0 301',
2727  'HTTP/1.1 301',
2728  'HTTP/1.0 302',
2729  'HTTP/1.1 302',
2730  'HTTP/1.0 401',
2731  'HTTP/1.1 401',
2732  'HTTP/1.0 200 Connection established');
2733  foreach ($skipHeaders as $hd) {
2734  $prefix = substr($data, 0, strlen($hd));
2735  if ($prefix == $hd) return true;
2736  }
2737 
2738  return false;
2739  }
$data
Definition: storeScorm.php:23

◆ parseCookie()

soap_transport_http::parseCookie (   $cookie_str)

parse an incoming Cookie into it's parts

Parameters
string$cookie_strcontent of cookie
Returns
array with data of that cookie private

Definition at line 3320 of file nusoap.php.

References $data, and $name.

3320  {
3321  $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
3322  $data = preg_split(';', $cookie_str);
3323  $value_str = $data[0];
3324 
3325  $cookie_param = 'domain=';
3326  $start = strpos($cookie_str, $cookie_param);
3327  if ($start > 0) {
3328  $domain = substr($cookie_str, $start + strlen($cookie_param));
3329  $domain = substr($domain, 0, strpos($domain, ';'));
3330  } else {
3331  $domain = '';
3332  }
3333 
3334  $cookie_param = 'expires=';
3335  $start = strpos($cookie_str, $cookie_param);
3336  if ($start > 0) {
3337  $expires = substr($cookie_str, $start + strlen($cookie_param));
3338  $expires = substr($expires, 0, strpos($expires, ';'));
3339  } else {
3340  $expires = '';
3341  }
3342 
3343  $cookie_param = 'path=';
3344  $start = strpos($cookie_str, $cookie_param);
3345  if ( $start > 0 ) {
3346  $path = substr($cookie_str, $start + strlen($cookie_param));
3347  $path = substr($path, 0, strpos($path, ';'));
3348  } else {
3349  $path = '/';
3350  }
3351 
3352  $cookie_param = ';secure;';
3353  if (strpos($cookie_str, $cookie_param) !== FALSE) {
3354  $secure = true;
3355  } else {
3356  $secure = false;
3357  }
3358 
3359  $sep_pos = strpos($value_str, '=');
3360 
3361  if ($sep_pos) {
3362  $name = substr($value_str, 0, $sep_pos);
3363  $value = substr($value_str, $sep_pos + 1);
3364  $cookie= array( 'name' => $name,
3365  'value' => $value,
3366  'domain' => $domain,
3367  'path' => $path,
3368  'expires' => $expires,
3369  'secure' => $secure
3370  );
3371  return $cookie;
3372  }
3373  return false;
3374  }
$data
Definition: storeScorm.php:23
if($format !==null) $name
Definition: metadata.php:230

◆ send() [1/2]

soap_transport_http::send (   $data,
  $timeout = 0,
  $response_timeout = 30 
)

send the SOAP message via HTTP

Parameters
string$datamessage data
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
Returns
string data public

Definition at line 1741 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

1741  {
1742 
1743  $this->debug('entered send() with data of length: '.strlen($data));
1744 
1745  $this->tryagain = true;
1746  $tries = 0;
1747  while ($this->tryagain) {
1748  $this->tryagain = false;
1749  if ($tries++ < 2) {
1750  // make connnection
1751  if (!$this->connect($timeout, $response_timeout)){
1752  return false;
1753  }
1754 
1755  // send request
1756  if (!$this->sendRequest($data)){
1757  return false;
1758  }
1759 
1760  // get response
1761  $respdata = $this->getResponse();
1762  } else {
1763  $this->setError('Too many tries to get an OK response');
1764  }
1765  }
1766  $this->debug('end of send()');
1767  return $respdata;
1768  }
connect($connection_timeout=0, $response_timeout=30)
Definition: nusoap.php:1615
setError($str)
sets error string
Definition: nusoap.php:184
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ send() [2/2]

soap_transport_http::send (   $data,
  $timeout = 0,
  $response_timeout = 30,
  $cookies = NULL 
)

sends the SOAP request and gets the SOAP response via HTTP[S]

Parameters
string$datamessage data
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
array$cookiescookies to send
Returns
string data public

Definition at line 2533 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

2533  {
2534 
2535  $this->debug('entered send() with data of length: '.strlen($data));
2536 
2537  $this->tryagain = true;
2538  $tries = 0;
2539  while ($this->tryagain) {
2540  $this->tryagain = false;
2541  if ($tries++ < 2) {
2542  // make connnection
2543  if (!$this->connect($timeout, $response_timeout)){
2544  return false;
2545  }
2546 
2547  // send request
2548  if (!$this->sendRequest($data, $cookies)){
2549  return false;
2550  }
2551 
2552  // get response
2553  $respdata = $this->getResponse();
2554  } else {
2555  $this->setError("Too many tries to get an OK response ($this->response_status_line)");
2556  }
2557  }
2558  $this->debug('end of send()');
2559  return $respdata;
2560  }
connect($connection_timeout=0, $response_timeout=30)
Definition: nusoap.php:1615
setError($str)
sets error string
Definition: nusoap.php:184
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ sendHTTPS() [1/2]

soap_transport_http::sendHTTPS (   $data,
  $timeout = 0,
  $response_timeout = 30 
)

send the SOAP message via HTTPS 1.0 using CURL

Parameters
string$msgmessage data
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
Returns
string data public

Definition at line 1780 of file nusoap.php.

References $data, and send().

1780  {
1781  return $this->send($data, $timeout, $response_timeout);
1782  }
$data
Definition: storeScorm.php:23
send($data, $timeout=0, $response_timeout=30)
send the SOAP message via HTTP
Definition: nusoap.php:1741
+ Here is the call graph for this function:

◆ sendHTTPS() [2/2]

soap_transport_http::sendHTTPS (   $data,
  $timeout = 0,
  $response_timeout = 30,
  $cookies 
)

sends the SOAP request and gets the SOAP response via HTTPS using CURL

Parameters
string$datamessage data
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
array$cookiescookies to send
Returns
string data public
Deprecated:

Definition at line 2574 of file nusoap.php.

References $data, and send().

2574  {
2575  return $this->send($data, $timeout, $response_timeout, $cookies);
2576  }
$data
Definition: storeScorm.php:23
send($data, $timeout=0, $response_timeout=30)
send the SOAP message via HTTP
Definition: nusoap.php:1741
+ Here is the call graph for this function:

◆ sendRequest() [1/2]

soap_transport_http::sendRequest (   $data)

Definition at line 1979 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

1979  {
1980  // build payload
1981  $this->buildPayload($data);
1982 
1983  if ($this->scheme == 'http' || $this->scheme == 'ssl') {
1984  // send payload
1985  if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {
1986  $this->setError('couldn\'t write message data to socket');
1987  $this->debug('couldn\'t write message data to socket');
1988  return false;
1989  }
1990  $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload));
1991  return true;
1992  } else if ($this->scheme == 'https') {
1993  // set payload
1994  // TODO: cURL does say this should only be the verb, and in fact it
1995  // turns out that the URI and HTTP version are appended to this, which
1996  // some servers refuse to work with
1997  //curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $this->outgoing_payload);
1998  foreach($this->outgoing_headers as $k => $v){
1999  $curl_headers[] = "$k: $v";
2000  }
2001  curl_setopt($this->ch, CURLOPT_HTTPHEADER, $curl_headers);
2002  if ($this->request_method == "POST") {
2003  curl_setopt($this->ch, CURLOPT_POST, 1);
2004  curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
2005  } else {
2006  }
2007  $this->debug('set cURL payload');
2008  return true;
2009  }
2010  }
setError($str)
sets error string
Definition: nusoap.php:184
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ sendRequest() [2/2]

soap_transport_http::sendRequest (   $data,
  $cookies = NULL 
)

sends the SOAP request via HTTP[S]

Parameters
string$datamessage data
array$cookiescookies to send
Returns
boolean true if OK, false if problem private

Definition at line 2855 of file nusoap.php.

References $data, nusoap_base\debug(), and nusoap_base\setError().

2855  {
2856  // build cookie string
2857  $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https')));
2858 
2859  // build payload
2860  $this->buildPayload($data, $cookie_str);
2861 
2862  if ($this->io_method() == 'socket') {
2863  // send payload
2864  if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {
2865  $this->setError('couldn\'t write message data to socket');
2866  $this->debug('couldn\'t write message data to socket');
2867  return false;
2868  }
2869  $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload));
2870  return true;
2871  } else if ($this->io_method() == 'curl') {
2872  // set payload
2873  // cURL does say this should only be the verb, and in fact it
2874  // turns out that the URI and HTTP version are appended to this, which
2875  // some servers refuse to work with (so we no longer use this method!)
2876  //$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload);
2877  $curl_headers = array();
2878  foreach($this->outgoing_headers as $k => $v){
2879  if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') {
2880  $this->debug("Skip cURL header $k: $v");
2881  } else {
2882  $curl_headers[] = "$k: $v";
2883  }
2884  }
2885  if ($cookie_str != '') {
2886  $curl_headers[] = 'Cookie: ' . $cookie_str;
2887  }
2888  $this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers);
2889  $this->debug('set cURL HTTP headers');
2890  if ($this->request_method == "POST") {
2891  $this->setCurlOption(CURLOPT_POST, 1);
2892  $this->setCurlOption(CURLOPT_POSTFIELDS, $data);
2893  $this->debug('set cURL POST data');
2894  } else {
2895  }
2896  // insert custom user-set cURL options
2897  foreach ($this->ch_options as $key => $val) {
2898  $this->setCurlOption($key, $val);
2899  }
2900 
2901  $this->debug('set cURL payload');
2902  return true;
2903  }
2904  }
setError($str)
sets error string
Definition: nusoap.php:184
$data
Definition: storeScorm.php:23
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
setCurlOption($option, $value)
sets a cURL option
Definition: nusoap.php:2200
getCookiesForRequest($cookies, $secure=false)
sort out cookies for the current request
Definition: nusoap.php:3384
io_method()
gets the I/O method to use
Definition: nusoap.php:2281
+ Here is the call graph for this function:

◆ setContentType() [1/2]

soap_transport_http::setContentType (   $type,
  $charset = false 
)

Definition at line 2284 of file nusoap.php.

References $type.

2284  {
2285  $this->outgoing_headers['Content-Type'] = $type . ($charset ? '; charset=' . $charset : '');
2286  }
$type

◆ setContentType() [2/2]

soap_transport_http::setContentType (   $type,
  $charset = false 
)

sets the content-type for the SOAP message to be sent

Parameters
string$typethe content type, MIME style
mixed$charsetcharacter set used for encoding (or false) public

Definition at line 3290 of file nusoap.php.

References $type.

3290  {
3291  $this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : ''));
3292  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
$type

◆ setCredentials() [1/2]

soap_transport_http::setCredentials (   $username,
  $password,
  $authtype = 'basic',
  $digestRequest = array() 
)

if authenticating, set user credentials here

Parameters
string$username
string$password
string$authtype
array$digestRequestpublic

Definition at line 1793 of file nusoap.php.

References $_SERVER, $password, and nusoap_base\debug().

1793  {
1794  global $_SERVER;
1795 
1796  $this->debug("Set credentials for authtype $authtype");
1797  // cf. RFC 2617
1798  if ($authtype == 'basic') {
1799  $this->outgoing_headers['Authorization'] = 'Basic '.base64_encode($username.':'.$password);
1800  } elseif ($authtype == 'digest') {
1801  if (isset($digestRequest['nonce'])) {
1802  $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1;
1803 
1804  // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html)
1805 
1806  // A1 = unq(username-value) ":" unq(realm-value) ":" passwd
1807  $A1 = $username. ':' . $digestRequest['realm'] . ':' . $password;
1808 
1809  // H(A1) = MD5(A1)
1810  $HA1 = md5($A1);
1811 
1812  // A2 = Method ":" digest-uri-value
1813  $A2 = 'POST:' . $this->uri;
1814 
1815  // H(A2)
1816  $HA2 = md5($A2);
1817 
1818  // KD(secret, data) = H(concat(secret, ":", data))
1819  // if qop == auth:
1820  // request-digest = <"> < KD ( H(A1), unq(nonce-value)
1821  // ":" nc-value
1822  // ":" unq(cnonce-value)
1823  // ":" unq(qop-value)
1824  // ":" H(A2)
1825  // ) <">
1826  // if qop is missing,
1827  // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <">
1828 
1829  $unhashedDigest = '';
1830  $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : '';
1831  $cnonce = $nonce;
1832  if ($digestRequest['qop'] != '') {
1833  $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2;
1834  } else {
1835  $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2;
1836  }
1837 
1838  $hashedDigest = md5($unhashedDigest);
1839 
1840  $this->outgoing_headers['Authorization'] = 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->uri . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"';
1841  }
1842  }
1843  $this->username = $username;
1844  $this->password = $password;
1845  $this->authtype = $authtype;
1846  $this->digestRequest = $digestRequest;
1847 
1848  if (isset($this->outgoing_headers['Authorization'])) {
1849  $this->debug('Authorization header set: ' . substr($this->outgoing_headers['Authorization'], 0, 12) . '...');
1850  } else {
1851  $this->debug('Authorization header not set');
1852  }
1853  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
+ Here is the call graph for this function:

◆ setCredentials() [2/2]

soap_transport_http::setCredentials (   $username,
  $password,
  $authtype = 'basic',
  $digestRequest = array(),
  $certRequest = array() 
)

if authenticating, set user credentials here

Parameters
string$username
string$password
string$authtype(basic|digest|certificate|ntlm)
array$digestRequest(keys must be nonce, nc, realm, qop)
array$certRequest(keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) public

Definition at line 2588 of file nusoap.php.

References $password, nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

2588  {
2589  $this->debug("setCredentials username=$username authtype=$authtype digestRequest=");
2590  $this->appendDebug($this->varDump($digestRequest));
2591  $this->debug("certRequest=");
2592  $this->appendDebug($this->varDump($certRequest));
2593  // cf. RFC 2617
2594  if ($authtype == 'basic') {
2595  $this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password));
2596  } elseif ($authtype == 'digest') {
2597  if (isset($digestRequest['nonce'])) {
2598  $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1;
2599 
2600  // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html)
2601 
2602  // A1 = unq(username-value) ":" unq(realm-value) ":" passwd
2603  $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password;
2604 
2605  // H(A1) = MD5(A1)
2606  $HA1 = md5($A1);
2607 
2608  // A2 = Method ":" digest-uri-value
2609  $A2 = $this->request_method . ':' . $this->digest_uri;
2610 
2611  // H(A2)
2612  $HA2 = md5($A2);
2613 
2614  // KD(secret, data) = H(concat(secret, ":", data))
2615  // if qop == auth:
2616  // request-digest = <"> < KD ( H(A1), unq(nonce-value)
2617  // ":" nc-value
2618  // ":" unq(cnonce-value)
2619  // ":" unq(qop-value)
2620  // ":" H(A2)
2621  // ) <">
2622  // if qop is missing,
2623  // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <">
2624 
2625  $unhashedDigest = '';
2626  $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : '';
2627  $cnonce = $nonce;
2628  if ($digestRequest['qop'] != '') {
2629  $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2;
2630  } else {
2631  $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2;
2632  }
2633 
2634  $hashedDigest = md5($unhashedDigest);
2635 
2636  $opaque = '';
2637  if (isset($digestRequest['opaque'])) {
2638  $opaque = ', opaque="' . $digestRequest['opaque'] . '"';
2639  }
2640 
2641  $this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"');
2642  }
2643  } elseif ($authtype == 'certificate') {
2644  $this->certRequest = $certRequest;
2645  $this->debug('Authorization header not set for certificate');
2646  } elseif ($authtype == 'ntlm') {
2647  // do nothing
2648  $this->debug('Authorization header not set for ntlm');
2649  }
2650  $this->username = $username;
2651  $this->password = $password;
2652  $this->authtype = $authtype;
2653  $this->digestRequest = $digestRequest;
2654  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:298
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
varDump($data)
Definition: nusoap.php:567
+ Here is the call graph for this function:

◆ setCurlOption()

soap_transport_http::setCurlOption (   $option,
  $value 
)

sets a cURL option

Parameters
mixed$optionThe cURL option (always integer?)
mixed$valueThe cURL option value private

Definition at line 2200 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

2200  {
2201  $this->debug("setCurlOption option=$option, value=");
2202  $this->appendDebug($this->varDump($value));
2203  curl_setopt($this->ch, $option, $value);
2204  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:298
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
varDump($data)
Definition: nusoap.php:567
+ Here is the call graph for this function:

◆ setEncoding() [1/2]

soap_transport_http::setEncoding (   $enc = 'gzip,
deflate'   
)

use http encoding

Parameters
string$encencoding style. supported values: gzip, deflate, or both public

Definition at line 1871 of file nusoap.php.

1871  {
1872  $this->protocol_version = '1.1';
1873  $this->outgoing_headers['Accept-Encoding'] = $enc;
1874  $this->outgoing_headers['Connection'] = 'close';
1875  $this->persistentConnection = false;
1876  #set_magic_quotes_runtime(0);
1877  // deprecated
1878  $this->encoding = $enc;
1879  }

◆ setEncoding() [2/2]

soap_transport_http::setEncoding (   $enc = 'gzip,
deflate'   
)

use http encoding

Parameters
string$encencoding style. supported values: gzip, deflate, or both public

Definition at line 2672 of file nusoap.php.

2672  {
2673  if (function_exists('gzdeflate')) {
2674  $this->protocol_version = '1.1';
2675  $this->setHeader('Accept-Encoding', $enc);
2676  if (!isset($this->outgoing_headers['Connection'])) {
2677  $this->setHeader('Connection', 'close');
2678  $this->persistentConnection = false;
2679  }
2680  #set_magic_quotes_runtime(0);
2681  // deprecated
2682  $this->encoding = $enc;
2683  }
2684  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213

◆ setHeader()

soap_transport_http::setHeader (   $name,
  $value 
)

sets an HTTP header

Parameters
string$nameThe name of the header
string$valueThe value of the header private

Definition at line 2213 of file nusoap.php.

References $name, and nusoap_base\debug().

2213  {
2214  $this->outgoing_headers[$name] = $value;
2215  $this->debug("set header $name: $value");
2216  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
if($format !==null) $name
Definition: metadata.php:230
+ Here is the call graph for this function:

◆ setProxy() [1/2]

soap_transport_http::setProxy (   $proxyhost,
  $proxyport,
  $proxyusername = '',
  $proxypassword = '' 
)

set proxy info here

Parameters
string$proxyhost
string$proxyport
string$proxyusername
string$proxypasswordpublic

Definition at line 1890 of file nusoap.php.

References $url.

1890  {
1891  $this->uri = $this->url;
1892  $this->host = $proxyhost;
1893  $this->port = $proxyport;
1894  if ($proxyusername != '' && $proxypassword != '') {
1895  $this->outgoing_headers['Proxy-Authorization'] = ' Basic '.base64_encode($proxyusername.':'.$proxypassword);
1896  }
1897  }

◆ setProxy() [2/2]

soap_transport_http::setProxy (   $proxyhost,
  $proxyport,
  $proxyusername = '',
  $proxypassword = '',
  $proxyauthtype = 'basic' 
)

set proxy info here

Parameters
string$proxyhostuse an empty string to remove proxy
string$proxyport
string$proxyusername
string$proxypassword
string$proxyauthtype(basic|ntlm) public

Definition at line 2696 of file nusoap.php.

References nusoap_base\debug().

2696  {
2697  if ($proxyhost) {
2698  $this->proxy = array(
2699  'host' => $proxyhost,
2700  'port' => $proxyport,
2701  'username' => $proxyusername,
2702  'password' => $proxypassword,
2703  'authtype' => $proxyauthtype
2704  );
2705  if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') {
2706  $this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword));
2707  }
2708  } else {
2709  $this->debug('remove proxy');
2710  $proxy = null;
2711  unsetHeader('Proxy-Authorization');
2712  }
2713  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
unsetHeader($name)
unsets an HTTP header
Definition: nusoap.php:2224
+ Here is the call graph for this function:

◆ setSOAPAction() [1/2]

soap_transport_http::setSOAPAction (   $soapaction)

set the soapaction value

Parameters
string$soapactionpublic

Definition at line 1861 of file nusoap.php.

1861  {
1862  $this->outgoing_headers['SOAPAction'] = '"' . $soapaction . '"';
1863  }

◆ setSOAPAction() [2/2]

soap_transport_http::setSOAPAction (   $soapaction)

set the soapaction value

Parameters
string$soapactionpublic

Definition at line 2662 of file nusoap.php.

2662  {
2663  $this->setHeader('SOAPAction', '"' . $soapaction . '"');
2664  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213

◆ setURL()

soap_transport_http::setURL (   $url)

sets the URL to which to connect

Parameters
string$urlThe URL to which to connect private

Definition at line 2237 of file nusoap.php.

References $url, and nusoap_base\debug().

2237  {
2238  $this->url = $url;
2239 
2240  $u = parse_url($url);
2241  foreach($u as $k => $v){
2242  $this->debug("parsed URL $k = $v");
2243  $this->$k = $v;
2244  }
2245 
2246  // add any GET params to path
2247  if(isset($u['query']) && $u['query'] != ''){
2248  $this->path .= '?' . $u['query'];
2249  }
2250 
2251  // set default port
2252  if(!isset($u['port'])){
2253  if($u['scheme'] == 'https'){
2254  $this->port = 443;
2255  } else {
2256  $this->port = 80;
2257  }
2258  }
2259 
2260  $this->uri = $this->path;
2261  $this->digest_uri = $this->uri;
2262 
2263  // build headers
2264  if (!isset($u['port'])) {
2265  $this->setHeader('Host', $this->host);
2266  } else {
2267  $this->setHeader('Host', $this->host.':'.$this->port);
2268  }
2269 
2270  if (isset($u['user']) && $u['user'] != '') {
2271  $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : '');
2272  }
2273  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213
setCredentials($username, $password, $authtype='basic', $digestRequest=array())
if authenticating, set user credentials here
Definition: nusoap.php:1793
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ soap_transport_http()

soap_transport_http::soap_transport_http (   $url)

constructor

Definition at line 1576 of file nusoap.php.

References $url, and nusoap_base\debug().

1576  {
1577  $this->url = $url;
1578 
1579  $u = parse_url($url);
1580  foreach($u as $k => $v){
1581  $this->debug("$k = $v");
1582  $this->$k = $v;
1583  }
1584 
1585  // add any GET params to path
1586  if(isset($u['query']) && $u['query'] != ''){
1587  $this->path .= '?' . $u['query'];
1588  }
1589 
1590  // set default port
1591  if(!isset($u['port'])){
1592  if($u['scheme'] == 'https'){
1593  $this->port = 443;
1594  } else {
1595  $this->port = 80;
1596  }
1597  }
1598 
1599  $this->uri = $this->path;
1600 
1601  // build headers
1602  ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev);
1603  $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')';
1604  if (!isset($u['port'])) {
1605  $this->outgoing_headers['Host'] = $this->host;
1606  } else {
1607  $this->outgoing_headers['Host'] = $this->host.':'.$this->port;
1608  }
1609 
1610  if (isset($u['user']) && $u['user'] != '') {
1611  $this->setCredentials($u['user'], isset($u['pass']) ? $u['pass'] : '');
1612  }
1613  }
setCredentials($username, $password, $authtype='basic', $digestRequest=array())
if authenticating, set user credentials here
Definition: nusoap.php:1793
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
+ Here is the call graph for this function:

◆ unsetHeader()

soap_transport_http::unsetHeader (   $name)

unsets an HTTP header

Parameters
string$nameThe name of the header private

Definition at line 2224 of file nusoap.php.

References $name, and nusoap_base\debug().

2224  {
2225  if (isset($this->outgoing_headers[$name])) {
2226  $this->debug("unset header $name");
2227  unset($this->outgoing_headers[$name]);
2228  }
2229  }
debug($string)
adds debug data to the class level debug string
Definition: nusoap.php:144
if($format !==null) $name
Definition: metadata.php:230
+ Here is the call graph for this function:

◆ usePersistentConnection() [1/2]

soap_transport_http::usePersistentConnection ( )

Definition at line 2288 of file nusoap.php.

2288  {
2289  if (isset($this->outgoing_headers['Accept-Encoding'])) {
2290  return false;
2291  }
2292  $this->protocol_version = '1.1';
2293  $this->persistentConnection = true;
2294  $this->outgoing_headers['Connection'] = 'Keep-Alive';
2295  return true;
2296  }

◆ usePersistentConnection() [2/2]

soap_transport_http::usePersistentConnection ( )

specifies that an HTTP persistent connection should be used

Returns
boolean whether the request was honored by this method. public

Definition at line 3300 of file nusoap.php.

3300  {
3301  if (isset($this->outgoing_headers['Accept-Encoding'])) {
3302  return false;
3303  }
3304  $this->protocol_version = '1.1';
3305  $this->persistentConnection = true;
3306  $this->setHeader('Connection', 'Keep-Alive');
3307  return true;
3308  }
setHeader($name, $value)
sets an HTTP header
Definition: nusoap.php:2213

Field Documentation

◆ $authtype

soap_transport_http::$authtype = ''

Definition at line 2161 of file nusoap.php.

◆ $certRequest

soap_transport_http::$certRequest = array()

Definition at line 2163 of file nusoap.php.

◆ $ch

soap_transport_http::$ch = false

Definition at line 1569 of file nusoap.php.

◆ $ch_options

soap_transport_http::$ch_options = array()

Definition at line 2156 of file nusoap.php.

◆ $digest_uri

soap_transport_http::$digest_uri = ''

Definition at line 2139 of file nusoap.php.

◆ $digestRequest

soap_transport_http::$digestRequest = array()

Definition at line 2162 of file nusoap.php.

◆ $encoding

soap_transport_http::$encoding = ''

Definition at line 1562 of file nusoap.php.

◆ $host

soap_transport_http::$host = ''

Definition at line 1557 of file nusoap.php.

◆ $incoming_cookies

soap_transport_http::$incoming_cookies = array()

Definition at line 2149 of file nusoap.php.

◆ $incoming_headers

soap_transport_http::$incoming_headers = array()

Definition at line 1564 of file nusoap.php.

◆ $incoming_payload

soap_transport_http::$incoming_payload = ''

Definition at line 1566 of file nusoap.php.

◆ $outgoing_headers

soap_transport_http::$outgoing_headers = array()

Definition at line 1563 of file nusoap.php.

◆ $outgoing_payload

soap_transport_http::$outgoing_payload = ''

Definition at line 1565 of file nusoap.php.

◆ $password

soap_transport_http::$password = ''

Definition at line 1571 of file nusoap.php.

◆ $path

soap_transport_http::$path = ''

Definition at line 1559 of file nusoap.php.

◆ $persistentConnection

soap_transport_http::$persistentConnection = false

Definition at line 1568 of file nusoap.php.

◆ $port

soap_transport_http::$port = ''

Definition at line 1558 of file nusoap.php.

◆ $protocol_version

soap_transport_http::$protocol_version = '1.0'

Definition at line 1561 of file nusoap.php.

◆ $proxy

soap_transport_http::$proxy = null

Definition at line 2158 of file nusoap.php.

◆ $request_method

soap_transport_http::$request_method = 'POST'

Definition at line 1560 of file nusoap.php.

◆ $response_status_line

soap_transport_http::$response_status_line

Definition at line 2152 of file nusoap.php.

◆ $scheme

soap_transport_http::$scheme = ''

Definition at line 1556 of file nusoap.php.

◆ $uri

soap_transport_http::$uri = ''

Definition at line 1555 of file nusoap.php.

◆ $url

soap_transport_http::$url = ''

Definition at line 1554 of file nusoap.php.

◆ $use_curl

soap_transport_http::$use_curl = false

Definition at line 2157 of file nusoap.php.

◆ $username

soap_transport_http::$username = ''

Definition at line 1570 of file nusoap.php.

◆ $useSOAPAction

soap_transport_http::$useSOAPAction = true

Definition at line 1567 of file nusoap.php.


The documentation for this class was generated from the following file: