Class soap_transport_http

Description

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

Located in /nusoap.php (line 2121)

nusoap_base
   |
   --soap_transport_http
Variable Summary
Method Summary
 soap_transport_http soap_transport_http (string $url, [array $curl_options = NULL], [boolean $use_curl = false])
 void buildPayload (string $data, [string $cookie_str = ''])
 boolean connect (mixed $connection_timeout, [integer $response_timeout = 30], integer $timeout)
 string decodeChunked (string $buffer, string $lb)
 string getCookiesForRequest (array $cookies, [boolean $secure = false])
 string getResponse ()
 string io_method ()
 boolean isSkippableCurlHeader (string &$data)
 array parseCookie (string $cookie_str)
 string send (string $data, integer $timeout, [integer $response_timeout = 30], [array $cookies = NULL])
 string sendHTTPS (string $data, integer $timeout, [integer $response_timeout = 30], array $cookies)
 boolean sendRequest (string $data, [array $cookies = NULL])
 void setContentType (string $type, [mixed $charset = false])
 void setCredentials (string $username, string $password, [string $authtype = 'basic'], [array $digestRequest = array()], [array $certRequest = array()])
 void setCurlOption (mixed $option, mixed $value)
 void setEncoding ([string $enc = 'gzip, deflate'])
 void setHeader (string $name, string $value)
 void setProxy (string $proxyhost, string $proxyport, [string $proxyusername = ''], [string $proxypassword = ''], [string $proxyauthtype = 'basic'])
 void setSOAPAction (string $soapaction)
 void setURL (string $url)
 void unsetHeader (string $name)
Variables
mixed $authtype = '' (line 2147)
mixed $certRequest = array() (line 2149)
mixed $ch = false (line 2141)
mixed $ch_options = array() (line 2142)
mixed $digestRequest = array() (line 2148)
mixed $digest_uri = '' (line 2125)
mixed $encoding = '' (line 2132)
mixed $host = '' (line 2127)
mixed $incoming_cookies = array() (line 2135)
mixed $incoming_headers = array() (line 2134)
mixed $incoming_payload = '' (line 2137)
mixed $outgoing_headers = array() (line 2133)
mixed $outgoing_payload = '' (line 2136)
mixed $password = '' (line 2146)
mixed $path = '' (line 2129)
mixed $persistentConnection = false (line 2140)
mixed $port = '' (line 2128)
mixed $protocol_version = '1.0' (line 2131)
mixed $proxy = null (line 2144)
mixed $request_method = 'POST' (line 2130)
mixed $response_status_line (line 2138)
mixed $scheme = '' (line 2126)
mixed $uri = '' (line 2124)
mixed $url = '' (line 2123)
mixed $username = '' (line 2145)
mixed $useSOAPAction = true (line 2139)
mixed $use_curl = false (line 2143)

Inherited Variables

Inherited from nusoap_base

nusoap_base::$charencoding
nusoap_base::$debugLevel
nusoap_base::$debug_str
nusoap_base::$error_str
nusoap_base::$namespaces
nusoap_base::$revision
nusoap_base::$soap_defencoding
nusoap_base::$title
nusoap_base::$typemap
nusoap_base::$usedNamespaces
nusoap_base::$version
nusoap_base::$xmlEntities
nusoap_base::$XMLSchemaVersion
Methods
Constructor soap_transport_http (line 2166)

constructor

  • access: public
soap_transport_http soap_transport_http (string $url, [array $curl_options = NULL], [boolean $use_curl = false])
  • string $url: The URL to which to connect
  • array $curl_options: User-specified cURL options
  • boolean $use_curl: Whether to try to force cURL use
buildPayload (line 2794)

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

  • access: private
void buildPayload (string $data, [string $cookie_str = ''])
  • string $data: HTTP body
  • string $cookie_str: data for HTTP Cookie header
connect (line 2283)

establish an HTTP connection

  • return: true if connected, false if not
  • access: private
boolean connect (mixed $connection_timeout, [integer $response_timeout = 30], integer $timeout)
  • integer $timeout: set connection timeout in seconds
  • integer $response_timeout: set response timeout in seconds
decodeChunked (line 2737)

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

  • deprecated:
  • access: public
string decodeChunked (string $buffer, string $lb)
  • string $buffer
  • string $lb
getCookiesForRequest (line 3370)

sort out cookies for the current request

  • return: for Cookie-HTTP-Header
  • access: private
string getCookiesForRequest (array $cookies, [boolean $secure = false])
  • array $cookies: array with all cookies
  • boolean $secure: is the send-content secure or not?
getResponse (line 2898)

gets the SOAP response via HTTP[S]

  • return: the response (also sets member variables like incoming_payload)
  • access: private
string getResponse ()
io_method (line 2267)

gets the I/O method to use

  • return: I/O method to use (socket|curl|unknown)
  • access: private
string io_method ()
isSkippableCurlHeader (line 2710)

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

Skippable headers result from chunked transfer and proxy requests.

  • return: Whether a skippable header was found.
  • access: private
boolean isSkippableCurlHeader (string &$data)
  • string $data: The string to check.
parseCookie (line 3306)

parse an incoming Cookie into it's parts

  • return: with data of that cookie
  • access: private
array parseCookie (string $cookie_str)
  • string $cookie_str: content of cookie
send (line 2519)

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

  • return: data
  • access: public
string send (string $data, integer $timeout, [integer $response_timeout = 30], [array $cookies = NULL])
  • string $data: message data
  • integer $timeout: set connection timeout in seconds
  • integer $response_timeout: set response timeout in seconds
  • array $cookies: cookies to send
sendHTTPS (line 2560)

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

  • return: data
  • deprecated:
  • access: public
string sendHTTPS (string $data, integer $timeout, [integer $response_timeout = 30], array $cookies)
  • string $data: message data
  • integer $timeout: set connection timeout in seconds
  • integer $response_timeout: set response timeout in seconds
  • array $cookies: cookies to send
sendRequest (line 2841)

sends the SOAP request via HTTP[S]

  • return: true if OK, false if problem
  • access: private
boolean sendRequest (string $data, [array $cookies = NULL])
  • string $data: message data
  • array $cookies: cookies to send
setContentType (line 3276)

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

  • access: public
void setContentType (string $type, [mixed $charset = false])
  • string $type: the content type, MIME style
  • mixed $charset: character set used for encoding (or false)
setCredentials (line 2574)

if authenticating, set user credentials here

  • access: public
void setCredentials (string $username, string $password, [string $authtype = 'basic'], [array $digestRequest = array()], [array $certRequest = array()])
  • 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)
setCurlOption (line 2186)

sets a cURL option

  • access: private
void setCurlOption (mixed $option, mixed $value)
  • mixed $option: The cURL option (always integer?)
  • mixed $value: The cURL option value
setEncoding (line 2658)

use http encoding

  • access: public
void setEncoding ([string $enc = 'gzip, deflate'])
  • string $enc: encoding style. supported values: gzip, deflate, or both
setHeader (line 2199)

sets an HTTP header

  • access: private
void setHeader (string $name, string $value)
  • string $name: The name of the header
  • string $value: The value of the header
setProxy (line 2682)

set proxy info here

  • access: public
void setProxy (string $proxyhost, string $proxyport, [string $proxyusername = ''], [string $proxypassword = ''], [string $proxyauthtype = 'basic'])
  • string $proxyhost: use an empty string to remove proxy
  • string $proxyport
  • string $proxyusername
  • string $proxypassword
  • string $proxyauthtype: (basic|ntlm)
setSOAPAction (line 2648)

set the soapaction value

  • access: public
void setSOAPAction (string $soapaction)
  • string $soapaction
setURL (line 2223)

sets the URL to which to connect

  • access: private
void setURL (string $url)
  • string $url: The URL to which to connect
unsetHeader (line 2210)

unsets an HTTP header

  • access: private
void unsetHeader (string $name)
  • string $name: The name of the header
usePersistentConnection (line 3286)

specifies that an HTTP persistent connection should be used

  • return: whether the request was honored by this method.
  • access: public
boolean usePersistentConnection ()

Inherited Methods

Inherited From nusoap_base

 nusoap_base::nusoap_base()
 nusoap_base::appendDebug()
 nusoap_base::clearDebug()
 nusoap_base::contractQname()
 nusoap_base::debug()
 nusoap_base::expandEntities()
 nusoap_base::expandQname()
 nusoap_base::formatDump()
 nusoap_base::getDebug()
 nusoap_base::getDebugAsXMLComment()
 nusoap_base::getDebugLevel()
 nusoap_base::getError()
 nusoap_base::getGlobalDebugLevel()
 nusoap_base::getLocalPart()
 nusoap_base::getmicrotime()
 nusoap_base::getNamespaceFromPrefix()
 nusoap_base::getPrefix()
 nusoap_base::getPrefixFromNamespace()
 nusoap_base::isArraySimpleOrStruct()
 nusoap_base::serializeEnvelope()
 nusoap_base::serialize_val()
 nusoap_base::setDebugLevel()
 nusoap_base::setError()
 nusoap_base::setGlobalDebugLevel()
 nusoap_base::varDump()
 nusoap_base::__toString()

Documentation generated on Tue, 06 Nov 2007 10:38:03 -0500 by phpDocumentor 1.3.0RC3