ILIAS
eassessment Revision 61809
|
transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support More...
Public Member Functions | |
soap_transport_http ($url) | |
constructor | |
connect ($connection_timeout=0, $response_timeout=30) | |
send ($data, $timeout=0, $response_timeout=30) | |
send the SOAP message via HTTP | |
sendHTTPS ($data, $timeout=0, $response_timeout=30) | |
send the SOAP message via HTTPS 1.0 using CURL | |
setCredentials ($username, $password, $authtype= 'basic', $digestRequest=array()) | |
if authenticating, set user credentials here | |
setSOAPAction ($soapaction) | |
set the soapaction value | |
setEncoding ($enc='gzip, deflate') | |
use http encoding | |
setProxy ($proxyhost, $proxyport, $proxyusername= '', $proxypassword= '') | |
set proxy info here | |
decodeChunked ($buffer, $lb) | |
decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6 | |
buildPayload ($data) | |
sendRequest ($data) | |
getResponse () | |
setContentType ($type, $charset=false) | |
usePersistentConnection () | |
soap_transport_http ($url, $curl_options=NULL, $use_curl=false) | |
constructor | |
setCurlOption ($option, $value) | |
sets a cURL option | |
setHeader ($name, $value) | |
sets an HTTP header | |
unsetHeader ($name) | |
unsets an HTTP header | |
setURL ($url) | |
sets the URL to which to connect | |
io_method () | |
gets the I/O method to use | |
connect ($connection_timeout=0, $response_timeout=30) | |
establish an HTTP connection | |
send ($data, $timeout=0, $response_timeout=30, $cookies=NULL) | |
sends the SOAP request and gets the SOAP response via HTTP[S] | |
sendHTTPS ($data, $timeout=0, $response_timeout=30, $cookies) | |
sends the SOAP request and gets the SOAP response via HTTPS using CURL | |
setCredentials ($username, $password, $authtype= 'basic', $digestRequest=array(), $certRequest=array()) | |
if authenticating, set user credentials here | |
setSOAPAction ($soapaction) | |
set the soapaction value | |
setEncoding ($enc='gzip, deflate') | |
use http encoding | |
setProxy ($proxyhost, $proxyport, $proxyusername= '', $proxypassword= '', $proxyauthtype= 'basic') | |
set proxy info here | |
isSkippableCurlHeader (&$data) | |
Test if the given string starts with a header that is to be skipped. | |
decodeChunked ($buffer, $lb) | |
decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6 | |
buildPayload ($data, $cookie_str= '') | |
Writes the payload, including HTTP headers, to $this->outgoing_payload. | |
sendRequest ($data, $cookies=NULL) | |
sends the SOAP request via HTTP[S] | |
getResponse () | |
gets the SOAP response via HTTP[S] | |
setContentType ($type, $charset=false) | |
sets the content-type for the SOAP message to be sent | |
usePersistentConnection () | |
specifies that an HTTP persistent connection should be used | |
parseCookie ($cookie_str) | |
parse an incoming Cookie into it's parts | |
getCookiesForRequest ($cookies, $secure=false) | |
sort out cookies for the current request | |
Public Member Functions inherited from nusoap_base | |
debug ($string) | |
adds debug data to the class level debug string | |
expandEntities ($val) | |
expands entities, e.g. | |
getError () | |
returns error string if present | |
setError ($str) | |
sets error string | |
isArraySimpleOrStruct ($val) | |
detect if array is a simple array or a struct (associative array) | |
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. | |
serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded') | |
serialize message | |
formatDump ($str) | |
contractQname ($qname) | |
contracts a qualified name | |
expandQname ($qname) | |
expands a qualified name | |
getLocalPart ($str) | |
returns the local part of a prefixed string returns the original string, if not prefixed | |
getPrefix ($str) | |
returns the prefix part of a prefixed string returns false, if not prefixed | |
getNamespaceFromPrefix ($prefix) | |
pass it a prefix, it returns a namespace returns false if no namespace registered with the given prefix | |
getPrefixFromNamespace ($ns) | |
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace | |
varDump ($data) | |
nusoap_base () | |
constructor | |
getGlobalDebugLevel () | |
gets the global debug level, which applies to future instances | |
setGlobalDebugLevel ($level) | |
sets the global debug level, which applies to future instances | |
getDebugLevel () | |
gets the debug level for this instance | |
setDebugLevel ($level) | |
sets the debug level for this instance | |
debug ($string) | |
adds debug data to the instance debug string with formatting | |
appendDebug ($string) | |
adds debug data to the instance debug string without formatting | |
clearDebug () | |
clears the current debug data for this instance | |
& | getDebug () |
gets the current debug data for this instance | |
& | getDebugAsXMLComment () |
gets the current debug data for this instance as an XML comment this may change the contents of the debug data | |
expandEntities ($val) | |
expands entities, e.g. | |
getError () | |
returns error string if present | |
setError ($str) | |
sets error string | |
isArraySimpleOrStruct ($val) | |
detect if array is a simple array or a struct (associative array) | |
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. | |
serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded', $encodingStyle='http://schemas.xmlsoap.org/soap/encoding/') | |
serializes a message | |
formatDump ($str) | |
formats a string to be inserted into an HTML stream | |
contractQname ($qname) | |
contracts (changes namespace to prefix) a qualified name | |
expandQname ($qname) | |
expands (changes prefix to namespace) a qualified name | |
getLocalPart ($str) | |
returns the local part of a prefixed string returns the original string, if not prefixed | |
getPrefix ($str) | |
returns the prefix part of a prefixed string returns false, if not prefixed | |
getNamespaceFromPrefix ($prefix) | |
pass it a prefix, it returns a namespace | |
getPrefixFromNamespace ($ns) | |
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace | |
getmicrotime () | |
returns the time in ODBC canonical form with microseconds | |
varDump ($data) | |
Returns a string with the output of var_dump. | |
__toString () | |
represents the object as a string |
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: 11808 $' | |
$error_str = false | |
$debug_str = '' | |
$charencoding = true | |
$XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema' | |
$soap_defencoding = 'UTF-8' | |
$namespaces | |
$usedNamespaces = array() | |
$typemap | |
$xmlEntities | |
$debugLevel |
transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CURL extension for HTTPS support
public
public
Definition at line 1552 of file nusoap.php.
soap_transport_http::buildPayload | ( | $data | ) |
Definition at line 1960 of file nusoap.php.
References $data.
Referenced by sendRequest().
soap_transport_http::buildPayload | ( | $data, | |
$cookie_str = '' |
|||
) |
Writes the payload, including HTTP headers, to $this->outgoing_payload.
string | $data | HTTP body |
string | $cookie_str | data for HTTP Cookie header |
Definition at line 2798 of file nusoap.php.
References $data, $uri, $url, nusoap_base\debug(), and setHeader().
soap_transport_http::connect | ( | $connection_timeout = 0 , |
|
$response_timeout = 30 |
|||
) |
Definition at line 1615 of file nusoap.php.
References nusoap_base\$error_str, $host, $path, $url, nusoap_base\debug(), and nusoap_base\setError().
Referenced by send().
soap_transport_http::connect | ( | $connection_timeout = 0 , |
|
$response_timeout = 30 |
|||
) |
establish an HTTP connection
integer | $timeout | set connection timeout in seconds |
integer | $response_timeout | set response timeout in seconds |
Definition at line 2287 of file nusoap.php.
References nusoap_base\$error_str, $host, $path, $port, $url, nusoap_base\appendDebug(), nusoap_base\debug(), io_method(), setCurlOption(), nusoap_base\setError(), setHeader(), and nusoap_base\varDump().
soap_transport_http::decodeChunked | ( | $buffer, | |
$lb | |||
) |
decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6
string | $buffer | |
string | $lb |
Definition at line 1908 of file nusoap.php.
References nusoap_base\debug().
soap_transport_http::decodeChunked | ( | $buffer, | |
$lb | |||
) |
decode a string that is encoded w/ "chunked' transfer encoding as defined in RFC2068 19.4.6
string | $buffer | |
string | $lb |
Definition at line 2741 of file nusoap.php.
References nusoap_base\debug().
soap_transport_http::getCookiesForRequest | ( | $cookies, | |
$secure = false |
|||
) |
sort out cookies for the current request
array | $cookies | array with all cookies |
boolean | $secure | is the send-content secure or not? |
Definition at line 3374 of file nusoap.php.
References $path, and nusoap_base\debug().
Referenced by sendRequest().
soap_transport_http::getResponse | ( | ) |
Definition at line 2012 of file nusoap.php.
References $data, $digestRequest, $incoming_payload, $pos, nusoap_base\debug(), setCredentials(), and nusoap_base\setError().
Referenced by send().
soap_transport_http::getResponse | ( | ) |
gets the SOAP response via HTTP[S]
Definition at line 2902 of file nusoap.php.
References $data, $digestRequest, $incoming_payload, $pos, nusoap_base\debug(), io_method(), isSkippableCurlHeader(), parseCookie(), setCredentials(), nusoap_base\setError(), and setURL().
soap_transport_http::io_method | ( | ) |
gets the I/O method to use
Definition at line 2271 of file nusoap.php.
Referenced by connect(), getResponse(), and sendRequest().
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.
string | $data | The string to check. |
Definition at line 2714 of file nusoap.php.
References $data.
Referenced by getResponse().
soap_transport_http::parseCookie | ( | $cookie_str | ) |
parse an incoming Cookie into it's parts
string | $cookie_str | content of cookie |
Definition at line 3310 of file nusoap.php.
References $data, $name, and $path.
Referenced by getResponse().
soap_transport_http::send | ( | $data, | |
$timeout = 0 , |
|||
$response_timeout = 30 |
|||
) |
send the SOAP message via HTTP
string | $data | message data |
integer | $timeout | set connection timeout in seconds |
integer | $response_timeout | set response timeout in seconds |
Definition at line 1741 of file nusoap.php.
References $data, connect(), nusoap_base\debug(), getResponse(), sendRequest(), and nusoap_base\setError().
Referenced by sendHTTPS().
soap_transport_http::send | ( | $data, | |
$timeout = 0 , |
|||
$response_timeout = 30 , |
|||
$cookies = NULL |
|||
) |
sends the SOAP request and gets the SOAP response via HTTP[S]
string | $data | message data |
integer | $timeout | set connection timeout in seconds |
integer | $response_timeout | set response timeout in seconds |
array | $cookies | cookies to send |
Definition at line 2523 of file nusoap.php.
References $data, connect(), nusoap_base\debug(), getResponse(), sendRequest(), and nusoap_base\setError().
soap_transport_http::sendHTTPS | ( | $data, | |
$timeout = 0 , |
|||
$response_timeout = 30 |
|||
) |
send the SOAP message via HTTPS 1.0 using CURL
string | $msg | message data |
integer | $timeout | set connection timeout in seconds |
integer | $response_timeout | set response timeout in seconds |
Definition at line 1780 of file nusoap.php.
soap_transport_http::sendHTTPS | ( | $data, | |
$timeout = 0 , |
|||
$response_timeout = 30 , |
|||
$cookies | |||
) |
sends the SOAP request and gets the SOAP response via HTTPS using CURL
string | $data | message data |
integer | $timeout | set connection timeout in seconds |
integer | $response_timeout | set response timeout in seconds |
array | $cookies | cookies to send |
Definition at line 2564 of file nusoap.php.
soap_transport_http::sendRequest | ( | $data | ) |
Definition at line 1979 of file nusoap.php.
References $data, buildPayload(), nusoap_base\debug(), and nusoap_base\setError().
Referenced by send().
soap_transport_http::sendRequest | ( | $data, | |
$cookies = NULL |
|||
) |
sends the SOAP request via HTTP[S]
string | $data | message data |
array | $cookies | cookies to send |
Definition at line 2845 of file nusoap.php.
References $data, buildPayload(), nusoap_base\debug(), getCookiesForRequest(), io_method(), setCurlOption(), and nusoap_base\setError().
soap_transport_http::setContentType | ( | $type, | |
$charset = false |
|||
) |
Definition at line 2284 of file nusoap.php.
References $type.
soap_transport_http::setContentType | ( | $type, | |
$charset = false |
|||
) |
sets the content-type for the SOAP message to be sent
string | $type | the content type, MIME style |
mixed | $charset | character set used for encoding (or false) public |
Definition at line 3280 of file nusoap.php.
References $type, and setHeader().
soap_transport_http::setCredentials | ( | $username, | |
$password, | |||
$authtype = 'basic' , |
|||
$digestRequest = array() |
|||
) |
if authenticating, set user credentials here
string | $username | |
string | $password | |
string | $authtype | |
array | $digestRequest | public |
Definition at line 1793 of file nusoap.php.
References $authtype, $digestRequest, $password, $uri, $username, and nusoap_base\debug().
Referenced by getResponse(), setURL(), and soap_transport_http().
soap_transport_http::setCredentials | ( | $username, | |
$password, | |||
$authtype = 'basic' , |
|||
$digestRequest = array() , |
|||
$certRequest = array() |
|||
) |
if authenticating, set user credentials here
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 2578 of file nusoap.php.
References $authtype, $certRequest, $digest_uri, $digestRequest, $password, $username, nusoap_base\appendDebug(), nusoap_base\debug(), setHeader(), and nusoap_base\varDump().
soap_transport_http::setCurlOption | ( | $option, | |
$value | |||
) |
sets a cURL option
mixed | $option | The cURL option (always integer?) |
mixed | $value | The cURL option value private |
Definition at line 2190 of file nusoap.php.
References nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().
Referenced by connect(), and sendRequest().
soap_transport_http::setEncoding | ( | $enc = 'gzip , |
|
deflate' | |||
) |
use http encoding
string | $enc | encoding style. supported values: gzip, deflate, or both public |
Definition at line 1871 of file nusoap.php.
References $enc.
soap_transport_http::setEncoding | ( | $enc = 'gzip , |
|
deflate' | |||
) |
use http encoding
string | $enc | encoding style. supported values: gzip, deflate, or both public |
Definition at line 2662 of file nusoap.php.
References $enc, and setHeader().
soap_transport_http::setHeader | ( | $name, | |
$value | |||
) |
sets an HTTP header
string | $name | The name of the header |
string | $value | The value of the header private |
Definition at line 2203 of file nusoap.php.
References $name, and nusoap_base\debug().
Referenced by buildPayload(), connect(), setContentType(), setCredentials(), setEncoding(), setProxy(), setSOAPAction(), setURL(), soap_transport_http(), and usePersistentConnection().
soap_transport_http::setProxy | ( | $proxyhost, | |
$proxyport, | |||
$proxyusername = '' , |
|||
$proxypassword = '' |
|||
) |
set proxy info here
string | $proxyhost | |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword | public |
Definition at line 1890 of file nusoap.php.
References $url.
soap_transport_http::setProxy | ( | $proxyhost, | |
$proxyport, | |||
$proxyusername = '' , |
|||
$proxypassword = '' , |
|||
$proxyauthtype = 'basic' |
|||
) |
set proxy info here
string | $proxyhost | use an empty string to remove proxy |
string | $proxyport | |
string | $proxyusername | |
string | $proxypassword | |
string | $proxyauthtype | (basic|ntlm) public |
Definition at line 2686 of file nusoap.php.
References $proxy, nusoap_base\debug(), setHeader(), and unsetHeader().
soap_transport_http::setSOAPAction | ( | $soapaction | ) |
set the soapaction value
string | $soapaction | public |
Definition at line 1861 of file nusoap.php.
soap_transport_http::setSOAPAction | ( | $soapaction | ) |
set the soapaction value
string | $soapaction | public |
Definition at line 2652 of file nusoap.php.
References setHeader().
soap_transport_http::setURL | ( | $url | ) |
sets the URL to which to connect
string | $url | The URL to which to connect private |
Definition at line 2227 of file nusoap.php.
References $path, $uri, $url, nusoap_base\debug(), setCredentials(), and setHeader().
Referenced by getResponse(), and soap_transport_http().
soap_transport_http::soap_transport_http | ( | $url | ) |
constructor
Definition at line 1576 of file nusoap.php.
References $host, $path, $port, $url, nusoap_base\debug(), and setCredentials().
soap_transport_http::soap_transport_http | ( | $url, | |
$curl_options = NULL , |
|||
$use_curl = false |
|||
) |
constructor
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 public |
Definition at line 2170 of file nusoap.php.
References $url, $use_curl, nusoap_base\appendDebug(), nusoap_base\debug(), nusoap_base\nusoap_base(), setHeader(), setURL(), and nusoap_base\varDump().
soap_transport_http::unsetHeader | ( | $name | ) |
unsets an HTTP header
string | $name | The name of the header private |
Definition at line 2214 of file nusoap.php.
References $name, and nusoap_base\debug().
Referenced by setProxy().
soap_transport_http::usePersistentConnection | ( | ) |
Definition at line 2288 of file nusoap.php.
soap_transport_http::usePersistentConnection | ( | ) |
specifies that an HTTP persistent connection should be used
Definition at line 3290 of file nusoap.php.
References setHeader().
soap_transport_http::$authtype = '' |
Definition at line 2151 of file nusoap.php.
Referenced by setCredentials().
soap_transport_http::$certRequest = array() |
Definition at line 2153 of file nusoap.php.
Referenced by setCredentials().
soap_transport_http::$ch = false |
Definition at line 1569 of file nusoap.php.
soap_transport_http::$ch_options = array() |
Definition at line 2146 of file nusoap.php.
soap_transport_http::$digest_uri = '' |
Definition at line 2129 of file nusoap.php.
Referenced by setCredentials().
soap_transport_http::$digestRequest = array() |
Definition at line 2152 of file nusoap.php.
Referenced by getResponse(), and setCredentials().
soap_transport_http::$encoding = '' |
Definition at line 1562 of file nusoap.php.
soap_transport_http::$host = '' |
Definition at line 1557 of file nusoap.php.
Referenced by connect(), and soap_transport_http().
soap_transport_http::$incoming_cookies = array() |
Definition at line 2139 of file nusoap.php.
soap_transport_http::$incoming_headers = array() |
Definition at line 1564 of file nusoap.php.
soap_transport_http::$incoming_payload = '' |
Definition at line 1566 of file nusoap.php.
Referenced by getResponse().
soap_transport_http::$outgoing_headers = array() |
Definition at line 1563 of file nusoap.php.
soap_transport_http::$outgoing_payload = '' |
Definition at line 1565 of file nusoap.php.
soap_transport_http::$password = '' |
Definition at line 1571 of file nusoap.php.
Referenced by setCredentials().
soap_transport_http::$path = '' |
Definition at line 1559 of file nusoap.php.
Referenced by connect(), getCookiesForRequest(), parseCookie(), setURL(), and soap_transport_http().
soap_transport_http::$persistentConnection = false |
Definition at line 1568 of file nusoap.php.
soap_transport_http::$port = '' |
Definition at line 1558 of file nusoap.php.
Referenced by connect(), and soap_transport_http().
soap_transport_http::$protocol_version = '1.0' |
Definition at line 1561 of file nusoap.php.
soap_transport_http::$proxy = null |
Definition at line 2148 of file nusoap.php.
Referenced by setProxy().
soap_transport_http::$request_method = 'POST' |
Definition at line 1560 of file nusoap.php.
soap_transport_http::$response_status_line |
Definition at line 2142 of file nusoap.php.
soap_transport_http::$scheme = '' |
Definition at line 1556 of file nusoap.php.
soap_transport_http::$uri = '' |
Definition at line 1555 of file nusoap.php.
Referenced by buildPayload(), setCredentials(), and setURL().
soap_transport_http::$url = '' |
Definition at line 1554 of file nusoap.php.
Referenced by buildPayload(), connect(), setProxy(), setURL(), and soap_transport_http().
soap_transport_http::$use_curl = false |
Definition at line 2147 of file nusoap.php.
Referenced by soap_transport_http().
soap_transport_http::$username = '' |
Definition at line 1570 of file nusoap.php.
Referenced by setCredentials().
soap_transport_http::$useSOAPAction = true |
Definition at line 1567 of file nusoap.php.