\nusoap_client
[nu]soapclient higher level class for easy usage.
usage:
// instantiate client with server info
$soapclient = new nusoap_client( string path [ ,mixed wsdl] );
// call method, get results
echo $soapclient->call( string methodname [ ,array parameters] );
// bye bye client
unset($soapclient);
- Author: Dietrich Ayala <dietrich@ganx4.com>
Synopsis
class nusoap_client
extends nusoap_base
{
- // members
- public string $username = '';
- public string $password = '';
- public string $authtype = '';
- public array $certRequest = ;
- public boolean $requestHeaders = false;
- public string $responseHeaders = '';
- public $responseHeader = NULL;
- public string $document = '';
- public $endpoint;
- public string $forceEndpoint = '';
- public string $proxyhost = '';
- public string $proxyport = '';
- public string $proxyusername = '';
- public string $proxypassword = '';
- public string $xml_encoding = '';
- public boolean $http_encoding = false;
- public integer $timeout = 0;
- public integer $response_timeout = 30;
- public string $endpointType = '';
- public boolean $persistentConnection = false;
- public boolean $defaultRpcParams = false;
- public string $request = '';
- public string $response = '';
- public string $responseData = '';
- public array $cookies = ;
- public boolean $decode_utf8 = true;
- public array $operations = ;
- public array $curl_options = ;
- public string $bindingType = '';
- public boolean $use_curl = false;
- public fault $fault;
- public faultcode $faultcode;
- public faultstring $faultstring;
- public faultdetail $faultdetail;
- // Inherited members from nusoap_base
- public string $title;
- public string $version;
- public string $revision;
- public string $error_str;
- public string $debug_str;
- public boolean $charencoding;
- public $debugLevel;
- public string $XMLSchemaVersion;
- public string $soap_defencoding;
- public array $namespaces;
- public array $usedNamespaces;
- public array $typemap;
- public array $xmlEntities;
- // methods
- public void nusoap_client()
- public mixed call()
- public void checkWSDL()
- public void loadWSDL()
- public array getOperationData()
- public mixed send()
- public mixed parseResponse()
- public void setCurlOption()
- public void setEndpoint()
- public void setHeaders()
- public string getHeaders()
- public mixed getHeader()
- public void setHTTPProxy()
- public void setCredentials()
- public void setHTTPEncoding()
- public void setUseCURL()
- public void useHTTPPersistentConnection()
- public boolean getDefaultRpcParams()
- public void setDefaultRpcParams()
- public getProxy()
- public string _getProxyClassCode()
- public string getProxyClassCode()
- public string getHTTPBody()
- public string getHTTPContentType()
- public string getHTTPContentTypeCharset()
- public void decodeUTF8()
- public boolean setCookie()
- public array getCookies()
- public boolean checkCookies()
- public boolean UpdateCookies()
- // Inherited methods from nusoap_base
- public void nusoap_base()
- public integer getGlobalDebugLevel()
- public void setGlobalDebugLevel()
- public int getDebugLevel()
- public void setDebugLevel()
- public void debug()
- public void appendDebug()
- public void clearDebug()
- public debug getDebug()
- public debug getDebugAsXMLComment()
- public void expandEntities()
- public mixed getError()
- public boolean setError()
- public string isArraySimpleOrStruct()
- public string serialize_val()
- public string serializeEnvelope()
- public string formatDump()
- public string contractQname()
- public string expandQname()
- public string getLocalPart()
- public mixed getPrefix()
- public mixed getNamespaceFromPrefix()
- public mixed getPrefixFromNamespace()
- public string getmicrotime()
- public string varDump()
- public string __toString()
Hierarchy
Extends
Tasks
Line | Task |
---|---|
692 | add an option to automatically run utf8_encode on $body and $headers |
Members
public
- $XMLSchemaVersion
—
string
set schema version - $authtype
- $bindingType
- $certRequest
- $charencoding
—
boolean
toggles automatic encoding of special characters as entities (should always be true, I think) - $curl_options
- $debugLevel
—
integer
the debug level for this instance - $debug_str
—
string
Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) - $decode_utf8
- $defaultRpcParams
- $document
- $endpoint
- $endpointType
- $error_str
—
string
Current error string (manipulated by getError/setError) - $fault — fault
- $faultcode — faultcode
- $faultdetail — faultdetail
- $faultstring — faultstring
- $forceEndpoint
- $http_encoding
- $namespaces
—
array
namespaces in an array of prefix => uri - $operations
- $password
- $persistentConnection
- $proxyhost
- $proxypassword
- $proxyport
- $proxyusername
- $request
- $requestHeaders
- $response
- $responseData
- $responseHeader
- $responseHeaders
- $response_timeout
- $revision
—
string
CVS revision for HTTP headers. - $soap_defencoding
—
string
charset encoding for outgoing messages - $timeout
- $title
—
string
Identification for HTTP headers. - $typemap
—
array
XML Schema types in an array of uri => (array of xml type => php type) is this legacy yet? no, this is used by the nusoap_xmlschema class to verify type => namespace mappings. - $use_curl
- $usedNamespaces
—
array
namespaces used in the current context, e.g. during serialization - $username
- $version
—
string
Version for HTTP headers. - $xmlEntities
—
array
XML entities to convert - $xml_encoding
Methods
public
- UpdateCookies() — updates the current cookies with a new set
- _getProxyClassCode() — dynamically creates proxy class code
- call() — calls method, returns PHP native type
- checkCookies() — checks all Cookies and delete those which are expired
- checkWSDL() — check WSDL passed as an instance or pulled from an endpoint
- decodeUTF8()
- getCookies() — gets all Cookies
- getDefaultRpcParams() — gets the default RPC parameter setting.
- getHTTPBody() — gets the HTTP body for the current request.
- getHTTPContentType() — gets the HTTP content type for the current request.
- getHTTPContentTypeCharset() — gets the HTTP content type charset for the current request.
- getHeader() — get the SOAP response Header (parsed)
- getHeaders() — get the SOAP response headers (namespace resolution incomplete)
- getOperationData() — get available data pertaining to an operation
- getProxy() — dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl
- getProxyClassCode() — dynamically creates proxy class code
- loadWSDL() — instantiate wsdl object and parse wsdl file
- nusoap_client() — constructor
- parseResponse() — processes SOAP message returned from server
- send() — send the SOAP message
- setCookie() — adds a new Cookie into $this->cookies array
- setCredentials() — if authenticating, set user credentials here
- setCurlOption() — sets user-specified cURL options
- setDefaultRpcParams() — sets the default RPC parameter setting.
- setEndpoint() — sets the SOAP endpoint, which can override WSDL
- setHTTPEncoding() — use HTTP encoding
- setHTTPProxy() — set proxy info here
- setHeaders() — set the SOAP headers
- setUseCURL() — Set whether to try to use cURL connections if possible
- useHTTPPersistentConnection() — use HTTP persistent connections if possible
Inherited from nusoap_base
public
- __toString() — represents the object as a string
- appendDebug() — adds debug data to the instance debug string without formatting
- clearDebug() — clears the current debug data for this instance
- contractQname() — contracts (changes namespace to prefix) a qualified name
- debug() — adds debug data to the instance debug string with formatting
- expandEntities() — expands entities, e.g. changes '<' to '<'.
- expandQname() — expands (changes prefix to namespace) a qualified name
- formatDump() — formats a string to be inserted into an HTML stream
- 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
- getDebugLevel() — gets the debug level for this instance
- getError() — returns error string if present
- getGlobalDebugLevel() — gets the global debug level, which applies to future instances
- getLocalPart() — returns the local part of a prefixed string returns the original string, if not prefixed
- getNamespaceFromPrefix() — pass it a prefix, it returns a namespace
- getPrefix() — returns the prefix part of a prefixed string returns false, if not prefixed
- getPrefixFromNamespace() — 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
- isArraySimpleOrStruct() — detect if array is a simple array or a struct (associative array)
- nusoap_base() — constructor
- serializeEnvelope() — serializes a message
- serialize_val() — serializes PHP values in accordance w/ section 5. Type information is not serialized if $use == 'literal'.
- setDebugLevel() — sets the debug level for this instance
- setError() — sets error string
- setGlobalDebugLevel() — sets the global debug level, which applies to future instances
- varDump() — Returns a string with the output of var_dump