constructor
nusoap_client
nusoap_client
(mixed $endpoint, [mixed $wsdl = false], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30], [string $portName = ''])
-
mixed
$endpoint: SOAP server or WSDL URL (string), or wsdl instance (object)
-
mixed
$wsdl: optional, set to 'wsdl' or true if using WSDL
-
string
$proxyhost: optional
-
string
$proxyport: optional
-
string
$proxyusername: optional
-
string
$proxypassword: optional
-
integer
$timeout: set the connection timeout
-
integer
$response_timeout: set the response timeout
-
string
$portName: optional portName in WSDL document
calls method, returns PHP native type
mixed
call
(string $operation, [mixed $params = array()], [string $namespace = 'http://tempuri.org'], [string $soapAction = ''], [mixed $headers = false], [boolean $rpcParams = null], [string $style = 'rpc'], [string $use = 'encoded'])
-
string
$operation: SOAP server URL or path
-
mixed
$params: An array, associative or simple, of the parameters for the method call, or a string that is the XML for the call. For rpc style, this call will wrap the XML in a tag named after the method, as well as the SOAP Envelope and Body. For document style, this will only wrap with the Envelope and Body. IMPORTANT: when using an array with document style, in which case there is really one parameter, the root of the fragment used in the call, which encloses what programmers normally think of parameters. A parameter array *must* include the wrapper.
-
string
$namespace: optional method namespace (WSDL can override)
-
string
$soapAction: optional SOAPAction value (WSDL can override)
-
mixed
$headers: optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array
-
boolean
$rpcParams: optional (no longer used)
-
string
$style: optional (rpc|document) the style to use when serializing parameters (WSDL can override)
-
string
$use: optional (encoded|literal) the use when serializing parameters (WSDL can override)
checks all Cookies and delete those which are expired
boolean
checkCookies
()
check WSDL passed as an instance or pulled from an endpoint
void
checkWSDL
()
void
decodeUTF8
(mixed $bool)
gets all Cookies
array
getCookies
()
gets the default RPC parameter setting.
If true, default is that call params are like RPC even for document style. Each call() can override this value.
This is no longer used.
boolean
getDefaultRpcParams
()
get the SOAP response Header (parsed)
mixed
getHeader
()
get the SOAP response headers (namespace resolution incomplete)
string
getHeaders
()
gets the HTTP body for the current request.
string
getHTTPBody
(string $soapmsg)
-
string
$soapmsg: The SOAP payload
Redefined in descendants as:
gets the HTTP content type for the current request.
Note: getHTTPBody must be called before this.
string
getHTTPContentType
()
Redefined in descendants as:
gets the HTTP content type charset for the current request.
returns false for non-text content types.
Note: getHTTPBody must be called before this.
string
getHTTPContentTypeCharset
()
Redefined in descendants as:
get available data pertaining to an operation
array
getOperationData
(string $operation)
-
string
$operation: operation name
dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl
object soap_proxy
getProxy
()
dynamically creates proxy class code
string
getProxyClassCode
()
instantiate wsdl object and parse wsdl file
void
loadWSDL
()
processes SOAP message returned from server
mixed
parseResponse
(array $headers, string $data)
-
array
$headers: The HTTP headers
-
string
$data: unprocessed response data from server
Redefined in descendants as:
send the SOAP message
Note: if the operation has multiple return values the return value of this method will be an array of those values.
mixed
send
(string $msg, [string $soapaction = ''], integer $timeout, [integer $response_timeout = 30])
-
string
$msg: a SOAPx4 soapmsg object
-
string
$soapaction: SOAPAction value
-
integer
$timeout: set connection timeout in seconds
-
integer
$response_timeout: set response timeout in seconds
adds a new Cookie into $this->cookies array
boolean
setCookie
(string $name, string $value)
-
string
$name: Cookie Name
-
string
$value: Cookie Value
if authenticating, set user credentials here
void
setCredentials
(string $username, string $password, [string $authtype = 'basic'], [array $certRequest = array()])
-
string
$username
-
string
$password
-
string
$authtype: (basic|digest|certificate|ntlm)
-
array
$certRequest: (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
sets user-specified cURL options
void
setCurlOption
(mixed $option, mixed $value)
-
mixed
$option: The cURL option (always integer?)
-
mixed
$value: The cURL option value
sets the default RPC parameter setting.
If true, default is that call params are like RPC even for document style Each call() can override this value.
This is no longer used.
void
setDefaultRpcParams
(boolean $rpcParams)
sets the SOAP endpoint, which can override WSDL
void
setEndpoint
(string $endpoint)
-
string
$endpoint: The endpoint URL to use, or empty string or false to prevent override
set the SOAP headers
void
setHeaders
(mixed $headers)
-
mixed
$headers: String of XML with SOAP header content, or array of soapval objects for SOAP headers
use HTTP encoding
void
setHTTPEncoding
([string $enc = 'gzip, deflate'])
-
string
$enc: HTTP encoding
set proxy info here
void
setHTTPProxy
(string $proxyhost, string $proxyport, [string $proxyusername = ''], [string $proxypassword = ''])
-
string
$proxyhost
-
string
$proxyport
-
string
$proxyusername
-
string
$proxypassword
Set whether to try to use cURL connections if possible
void
setUseCURL
(boolean $use)
-
boolean
$use: Whether to try to use cURL
updates the current cookies with a new set
boolean
UpdateCookies
(array $cookies)
-
array
$cookies: new cookies with which to update current ones
use HTTP persistent connections if possible
void
useHTTPPersistentConnection
()
dynamically creates proxy class code
string
_getProxyClassCode
(mixed $r)
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()