[ Index ]
 

Code source de nusoap 0.7.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/ -> class.soapclient.php (sommaire)

(pas de description)

Poids: 859 lignes (28 kb)
Inclus ou requis: 2 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

soapclient:: (25 méthodes):
  soapclient()
  call()
  getOperationData()
  send()
  parseResponse()
  setEndpoint()
  setHeaders()
  getHeaders()
  setHTTPProxy()
  setCredentials()
  setHTTPEncoding()
  useHTTPPersistentConnection()
  getDefaultRpcParams()
  setDefaultRpcParams()
  getProxy()
  _getProxyClassCode()
  getProxyClassCode()
  getHTTPBody()
  getHTTPContentType()
  getHTTPContentTypeCharset()
  decodeUTF8()
  setCookie()
  getCookies()
  checkCookies()
  UpdateCookies()


Classe: soapclient  - X-Ref

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);

soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30)   X-Ref
constructor

param: mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object)
param: bool $wsdl optional, set to true if using WSDL
param: int $portName optional portName in WSDL document
param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword
param: integer $timeout set the connection timeout
param: integer $response_timeout set the response timeout

call($operation,$params=array()   X-Ref
calls method, returns PHP native type

param: string $method SOAP server URL or path
param: mixed $params An array, associative or simple, of the parameters
param: string $namespace optional method namespace (WSDL can override)
param: string $soapAction optional SOAPAction value (WSDL can override)
param: mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers
param: boolean $rpcParams optional (no longer used)
param: string    $style optional (rpc|document) the style to use when serializing parameters (WSDL can override)
param: string    $use optional (encoded|literal) the use when serializing parameters (WSDL can override)
return: mixed    response from SOAP call

getOperationData($operation)   X-Ref
get available data pertaining to an operation

param: string $operation operation name
return: array array of data pertaining to the operation

send($msg, $soapaction = '', $timeout=0, $response_timeout=30)   X-Ref
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.

param: string $msg a SOAPx4 soapmsg object
param: string $soapaction SOAPAction value
param: integer $timeout set connection timeout in seconds
param: integer $response_timeout set response timeout in seconds
return: mixed native PHP types.

parseResponse($headers, $data)   X-Ref
processes SOAP message returned from server

param: array    $headers    The HTTP headers
param: string    $data        unprocessed response data from server
return: mixed    value of the message, decoded into a PHP type

setEndpoint($endpoint)   X-Ref
sets the SOAP endpoint, which can override WSDL

param: $endpoint string The endpoint URL to use, or empty string or false to prevent override

setHeaders($headers)   X-Ref
set the SOAP headers

param: $headers mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers

getHeaders()   X-Ref
get the SOAP response headers (namespace resolution incomplete)

return: string

setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '')   X-Ref
set proxy info here

param: string $proxyhost
param: string $proxyport
param: string $proxyusername
param: string $proxypassword

setCredentials($username, $password, $authtype = 'basic', $certRequest = array()   X-Ref
if authenticating, set user credentials here

param: string $username
param: string $password
param: string $authtype (basic|digest|certificate)
param: array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)

setHTTPEncoding($enc='gzip, deflate')   X-Ref
use HTTP encoding

param: string $enc

useHTTPPersistentConnection()   X-Ref
use HTTP persistent connections if possible


getDefaultRpcParams()   X-Ref
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.

return: boolean

setDefaultRpcParams($rpcParams)   X-Ref
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.

param: boolean $rpcParams

getProxy()   X-Ref
dynamically creates an instance of a proxy class,
allowing user to directly call methods from wsdl

return: object soap_proxy object

_getProxyClassCode($r)   X-Ref
dynamically creates proxy class code

return: string PHP/NuSOAP code for the proxy class

getProxyClassCode()   X-Ref
Pas de description

getHTTPBody($soapmsg)   X-Ref
gets the HTTP body for the current request.

param: string $soapmsg The SOAP payload
return: string The HTTP body, which includes the SOAP payload

getHTTPContentType()   X-Ref
gets the HTTP content type for the current request.

Note: getHTTPBody must be called before this.

return: string the HTTP content type for the current request.

getHTTPContentTypeCharset()   X-Ref
gets the HTTP content type charset for the current request.
returns false for non-text content types.

Note: getHTTPBody must be called before this.

return: string the HTTP content type charset for the current request.

decodeUTF8($bool)   X-Ref
Pas de description

setCookie($name, $value)   X-Ref
adds a new Cookie into $this->cookies array

param: string $name Cookie Name
param: string $value Cookie Value
return: if cookie-set was successful returns true, else false

getCookies()   X-Ref
gets all Cookies

return: array with all internal cookies

checkCookies()   X-Ref
checks all Cookies and delete those which are expired

return: always return true

UpdateCookies($cookies)   X-Ref
updates the current cookies with a new set

param: array $cookies new cookies with which to update current ones
return: always return true



Généré le : Mon Sep 10 13:53:24 2007 par Balluche grâce à PHPXref 0.7