Class soapclient

Description

soapclient higher level class for easy usage.

usage:

// instantiate client with server info $soapclient = new soapclient( string path [ ,boolean wsdl] );

// call method, get results echo $soapclient->call( string methodname [ ,array parameters] );

// bye bye client unset($soapclient);

  • access: public
  • version: $Id: class.soapclient.php,v 1.52 2005/07/27 19:24:42 snichol Exp $
  • author: Dietrich Ayala <dietrich@ganx4.com>

Located in /core/nusoap/lib/class.soapclient.php (line 25)

nusoap_base
   |
   --soapclient
Variable Summary
Method Summary
soapclient soapclient (mixed $endpoint, [bool $wsdl = false], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30], int $portName)
mixed call (mixed $operation, [mixed $params = array()], [string $namespace = 'http://tempuri.org'], [string $soapAction = ''], [mixed $headers = false], [boolean $rpcParams = null], [string $style = 'rpc'], [string $use = 'encoded'], string $method)
void decodeUTF8 (mixed $bool)
array getCookies ()
boolean getDefaultRpcParams ()
string getHeaders ()
array getOperationData (string $operation)
object soap_proxy getProxy ()
string getProxyClassCode ()
if setCookie (string $name, string $value)
void setCredentials (string $username, string $password, [string $authtype = 'basic'], [array $certRequest = array()])
void setDefaultRpcParams (boolean $rpcParams)
void setEndpoint ($endpoint $endpoint)
void setHeaders ($headers $headers)
void setHTTPEncoding ([string $enc = 'gzip, deflate'])
void setHTTPProxy (string $proxyhost, string $proxyport, [string $proxyusername = ''], [string $proxypassword = ''])
Variables
mixed $authtype = '' (line 29)
mixed $certRequest = array() (line 30)
mixed $cookies = array() (line 50)
mixed $decode_utf8 = true (line 51)
mixed $defaultRpcParams = false (line 46)
mixed $document = '' (line 33)
mixed $endpoint (line 34)
mixed $endpointType = '' (line 44)
fault $fault (line 61)
  • access: public
faultcode $faultcode (line 66)
  • access: public
faultdetail $faultdetail (line 76)
  • access: public
faultstring $faultstring (line 71)
  • access: public
mixed $forceEndpoint = '' (line 35)
mixed $http_encoding = false (line 41)
mixed $operations = array() (line 52)
mixed $password = '' (line 28)
mixed $persistentConnection = false (line 45)
mixed $proxyhost = '' (line 36)
mixed $proxypassword = '' (line 39)
mixed $proxyport = '' (line 37)
mixed $proxyusername = '' (line 38)
mixed $request = '' (line 47)
mixed $requestHeaders = false (line 31)
mixed $response = '' (line 48)
mixed $responseData = '' (line 49)
mixed $responseHeaders = '' (line 32)
mixed $response_timeout = 30 (line 43)
mixed $timeout = 0 (line 42)
mixed $username = '' (line 27)
mixed $xml_encoding = '' (line 40)
Methods
Constructor soapclient (line 92)

constructor

  • access: public
soapclient soapclient (mixed $endpoint, [bool $wsdl = false], [string $proxyhost = false], [string $proxyport = false], [string $proxyusername = false], [string $proxypassword = false], integer $timeout, [integer $response_timeout = 30], int $portName)
  • mixed $endpoint: SOAP server or WSDL URL (string), or wsdl instance (object)
  • bool $wsdl: optional, set to true if using WSDL
  • int $portName: optional portName in WSDL document
  • string $proxyhost
  • string $proxyport
  • string $proxyusername
  • string $proxypassword
  • integer $timeout: set the connection timeout
  • integer $response_timeout: set the response timeout
call (line 160)

calls method, returns PHP native type

  • return: response from SOAP call
  • access: public
mixed call (mixed $operation, [mixed $params = array()], [string $namespace = 'http://tempuri.org'], [string $soapAction = ''], [mixed $headers = false], [boolean $rpcParams = null], [string $style = 'rpc'], [string $use = 'encoded'], string $method)
  • string $method: 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
  • 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)
decodeUTF8 (line 727)
void decodeUTF8 (mixed $bool)
getCookies (line 754)

gets all Cookies

  • return: with all internal cookies
  • access: public
array getCookies ()
getDefaultRpcParams (line 570)

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.

  • deprecated:
  • access: public
boolean getDefaultRpcParams ()
getHeaders (line 504)

get the SOAP response headers (namespace resolution incomplete)

  • access: public
string getHeaders ()
getOperationData (line 336)

get available data pertaining to an operation

  • return: array of data pertaining to the operation
  • access: public
array getOperationData (string $operation)
  • string $operation: operation name
getProxy (line 596)

dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl

  • return: object
  • access: public
object soap_proxy getProxy ()
getProxyClassCode (line 680)

dynamically creates proxy class code

  • return: PHP/NuSOAP code for the proxy class
  • access: public
string getProxyClassCode ()
setCookie (line 740)

adds a new Cookie into $this->cookies array

  • return: cookie-set was successful returns true, else false
  • access: public
if setCookie (string $name, string $value)
  • string $name: Cookie Name
  • string $value: Cookie Value
setCredentials (line 533)

if authenticating, set user credentials here

  • access: public
void setCredentials (string $username, string $password, [string $authtype = 'basic'], [array $certRequest = array()])
  • string $username
  • string $password
  • string $authtype: (basic|digest|certificate)
  • array $certRequest: (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
setDefaultRpcParams (line 585)

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.

  • deprecated:
  • access: public
void setDefaultRpcParams (boolean $rpcParams)
  • boolean $rpcParams
setEndpoint (line 484)

sets the SOAP endpoint, which can override WSDL

  • access: public
void setEndpoint ($endpoint $endpoint)
  • $endpoint $endpoint: string The endpoint URL to use, or empty string or false to prevent override
setHeaders (line 494)

set the SOAP headers

  • access: public
void setHeaders ($headers $headers)
  • $headers $headers: mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers
setHTTPEncoding (line 546)

use HTTP encoding

  • access: public
void setHTTPEncoding ([string $enc = 'gzip, deflate'])
  • string $enc
setHTTPProxy (line 517)

set proxy info here

  • access: public
void setHTTPProxy (string $proxyhost, string $proxyport, [string $proxyusername = ''], [string $proxypassword = ''])
  • string $proxyhost
  • string $proxyport
  • string $proxyusername
  • string $proxypassword
useHTTPPersistentConnection (line 555)

use HTTP persistent connections if possible

  • access: public
void useHTTPPersistentConnection ()

Documentation generated on Tue, 4 Oct 2005 21:58:52 -0700 by phpDocumentor 1.3.0RC3