ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
nusoap_client Class Reference

[nu]soapclient higher level class for easy usage. More...

+ Inheritance diagram for nusoap_client:
+ Collaboration diagram for nusoap_client:

Public Member Functions

 __construct ($endpoint, $wsdl=false, $proxyhost=false, $proxyport=false, $proxyusername=false, $proxypassword=false, $timeout=0, $response_timeout=30)
 constructor More...
 
 call ($operation, $params=array(), $namespace='http://tempuri.org', $soapAction='', $headers=false, $rpcParams=null, $style='rpc', $use='encoded')
 calls method, returns PHP native type More...
 
 checkWSDL ()
 check WSDL passed as an instance or pulled from an endpoint More...
 
 loadWSDL ()
 instantiate wsdl object and parse wsdl file More...
 
 getOperationData ($operation)
 get available data pertaining to an operation More...
 
 send ($msg, $soapaction='', $timeout=0, $response_timeout=30)
 send the SOAP message More...
 
 parseResponse ($headers, $data)
 processes SOAP message returned from server More...
 
 setCurlOption ($option, $value)
 sets user-specified cURL options More...
 
 setEndpoint ($endpoint)
 sets the SOAP endpoint, which can override WSDL More...
 
 setHeaders ($headers)
 set the SOAP headers More...
 
 getHeaders ()
 get the SOAP response headers (namespace resolution incomplete) More...
 
 getHeader ()
 get the SOAP response Header (parsed) More...
 
 setHTTPProxy ($proxyhost, $proxyport, $proxyusername='', $proxypassword='')
 set proxy info here More...
 
 setCredentials ($username, $password, $authtype='basic', $certRequest=array())
 if authenticating, set user credentials here More...
 
 setHTTPEncoding ($enc='gzip, deflate')
 use HTTP encoding More...
 
 setUseCURL ($use)
 Set whether to try to use cURL connections if possible. More...
 
 useHTTPPersistentConnection ()
 use HTTP persistent connections if possible More...
 
 getDefaultRpcParams ()
 gets the default RPC parameter setting. More...
 
 setDefaultRpcParams ($rpcParams)
 sets the default RPC parameter setting. More...
 
 getProxy ()
 dynamically creates an instance of a proxy class, allowing user to directly call methods from wsdl More...
 
 _getProxyClassCode ($r)
 dynamically creates proxy class code More...
 
 getProxyClassCode ()
 dynamically creates proxy class code More...
 
 getHTTPBody ($soapmsg)
 gets the HTTP body for the current request. More...
 
 getHTTPContentType ()
 gets the HTTP content type for the current request. More...
 
 getHTTPContentTypeCharset ()
 gets the HTTP content type charset for the current request. More...
 
 decodeUTF8 ($bool)
 
 setCookie ($name, $value)
 adds a new Cookie into $this->cookies array More...
 
 getCookies ()
 gets all Cookies More...
 
 checkCookies ()
 checks all Cookies and delete those which are expired More...
 
 UpdateCookies ($cookies)
 updates the current cookies with a new set More...
 
- Public Member Functions inherited from nusoap_base
 __construct ()
 constructor More...
 
 getGlobalDebugLevel ()
 gets the global debug level, which applies to future instances More...
 
 setGlobalDebugLevel ($level)
 sets the global debug level, which applies to future instances More...
 
 getDebugLevel ()
 gets the debug level for this instance More...
 
 setDebugLevel ($level)
 sets the debug level for this instance More...
 
 debug ($string)
 adds debug data to the instance debug string with formatting More...
 
 appendDebug ($string)
 adds debug data to the instance debug string without formatting More...
 
 clearDebug ()
 clears the current debug data for this instance More...
 
getDebug ()
 gets the current debug data for this instance More...
 
getDebugAsXMLComment ()
 gets the current debug data for this instance as an XML comment this may change the contents of the debug data More...
 
 expandEntities ($val)
 expands entities, e.g. More...
 
 getError ()
 returns error string if present More...
 
 setError ($str)
 sets error string More...
 
 isArraySimpleOrStruct ($val)
 detect if array is a simple array or a struct (associative array) More...
 
 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. More...
 
 serializeEnvelope ($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded', $encodingStyle='http://schemas.xmlsoap.org/soap/encoding/')
 serializes a message More...
 
 formatDump ($str)
 formats a string to be inserted into an HTML stream More...
 
 contractQname ($qname)
 contracts (changes namespace to prefix) a qualified name More...
 
 expandQname ($qname)
 expands (changes prefix to namespace) a qualified name More...
 
 getLocalPart ($str)
 returns the local part of a prefixed string returns the original string, if not prefixed More...
 
 getPrefix ($str)
 returns the prefix part of a prefixed string returns false, if not prefixed More...
 
 getNamespaceFromPrefix ($prefix)
 pass it a prefix, it returns a namespace More...
 
 getPrefixFromNamespace ($ns)
 returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given namespace More...
 
 getmicrotime ()
 returns the time in ODBC canonical form with microseconds More...
 
 varDump ($data)
 Returns a string with the output of var_dump. More...
 
 __toString ()
 represents the object as a string More...
 

Data Fields

 $username = ''
 
 $password = ''
 
 $authtype = ''
 
 $certRequest = array()
 
 $requestHeaders = false
 
 $responseHeaders = ''
 
 $responseHeader = null
 
 $document = ''
 
 $endpoint
 
 $forceEndpoint = ''
 
 $proxyhost = ''
 
 $proxyport = ''
 
 $proxyusername = ''
 
 $proxypassword = ''
 
 $xml_encoding = ''
 
 $http_encoding = false
 
 $timeout = 0
 
 $response_timeout = 30
 
 $endpointType = ''
 
 $persistentConnection = false
 
 $defaultRpcParams = false
 
 $request = ''
 
 $response = ''
 
 $responseData = ''
 
 $cookies = array()
 
 $decode_utf8 = true
 
 $operations = array()
 
 $curl_options = array()
 
 $bindingType = ''
 
 $use_curl = false
 
 $fault
 
 $faultcode
 
 $faultstring
 
 $faultdetail
 
- Data Fields inherited from nusoap_base
 $title = 'NuSOAP'
 
 $version = '0.7.3'
 
 $revision = '$Revision$'
 
 $error_str = ''
 
 $debug_str = ''
 
 $charencoding = true
 
 $debugLevel
 
 $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'
 
 $soap_defencoding = 'UTF-8'
 
 $namespaces
 
 $usedNamespaces = array()
 
 $typemap
 
 $xmlEntities
 

Detailed Description

[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 dietr.nosp@m.ich@.nosp@m.ganx4.nosp@m..com
Scott Nichol snich.nosp@m.ol@u.nosp@m.sers..nosp@m.sour.nosp@m.cefor.nosp@m.ge.n.nosp@m.et
Version
$Id$ public

Definition at line 7203 of file nusoap.php.

Constructor & Destructor Documentation

◆ __construct()

nusoap_client::__construct (   $endpoint,
  $wsdl = false,
  $proxyhost = false,
  $proxyport = false,
  $proxyusername = false,
  $proxypassword = false,
  $timeout = 0,
  $response_timeout = 30 
)

constructor

Parameters
mixed$endpointSOAP server or WSDL URL (string), or wsdl instance (object)
bool$wsdloptional, set to true if using WSDL
int$portNameoptional portName in WSDL document
string$proxyhost
string$proxyport
string$proxyusername
string$proxypassword
integer$timeoutset the connection timeout
integer$response_timeoutset the response timeout public

Definition at line 7274 of file nusoap.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct(), nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

7275  {
7277  $this->endpoint = $endpoint;
7278  $this->proxyhost = $proxyhost;
7279  $this->proxyport = $proxyport;
7280  $this->proxyusername = $proxyusername;
7281  $this->proxypassword = $proxypassword;
7282  $this->timeout = $timeout;
7283  $this->response_timeout = $response_timeout;
7284 
7285  $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
7286  $this->appendDebug('endpoint=' . $this->varDump($endpoint));
7287 
7288  // make values
7289  if ($wsdl) {
7290  if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) {
7291  $this->wsdl = $endpoint;
7292  $this->endpoint = $this->wsdl->wsdl;
7293  $this->wsdlFile = $this->endpoint;
7294  $this->debug('existing wsdl instance created from ' . $this->endpoint);
7295  $this->checkWSDL();
7296  } else {
7297  $this->wsdlFile = $this->endpoint;
7298  $this->wsdl = null;
7299  $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint);
7300  }
7301  $this->endpointType = 'wsdl';
7302  } else {
7303  $this->debug("instantiate SOAP with endpoint at $endpoint");
7304  $this->endpointType = 'soap';
7305  }
7306  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
parses a WSDL file, allows access to it's data, other utility methods.
Definition: nusoap.php:4615
checkWSDL()
check WSDL passed as an instance or pulled from an endpoint
Definition: nusoap.php:7517
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
__construct(VocabulariesInterface $vocabularies)
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

Member Function Documentation

◆ _getProxyClassCode()

nusoap_client::_getProxyClassCode (   $r)

dynamically creates proxy class code

Returns
string PHP/NuSOAP code for the proxy class private

Definition at line 7934 of file nusoap.php.

References $r, nusoap_base\appendDebug(), nusoap_base\debug(), nusoap_base\getError(), nusoap_base\setError(), and nusoap_base\varDump().

7935  {
7936  $this->debug("in getProxy endpointType=$this->endpointType");
7937  $this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
7938  if ($this->endpointType != 'wsdl') {
7939  $evalStr = 'A proxy can only be created for a WSDL client';
7940  $this->setError($evalStr);
7941  $evalStr = "echo \"$evalStr\";";
7942  return $evalStr;
7943  }
7944  if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
7945  $this->loadWSDL();
7946  if ($this->getError()) {
7947  return "echo \"" . $this->getError() . "\";";
7948  }
7949  }
7950  $evalStr = '';
7951  foreach ($this->operations as $operation => $opData) {
7952  if ($operation != '') {
7953  // create param string and param comment string
7954  if (sizeof($opData['input']['parts']) > 0) {
7955  $paramStr = '';
7956  $paramArrayStr = '';
7957  $paramCommentStr = '';
7958  foreach ($opData['input']['parts'] as $name => $type) {
7959  $paramStr .= "\$$name, ";
7960  $paramArrayStr .= "'$name' => \$$name, ";
7961  $paramCommentStr .= "$type \$$name, ";
7962  }
7963  $paramStr = substr($paramStr, 0, strlen($paramStr)-2);
7964  $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2);
7965  $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2);
7966  } else {
7967  $paramStr = '';
7968  $paramArrayStr = '';
7969  $paramCommentStr = 'void';
7970  }
7971  $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace'];
7972  $evalStr .= "// $paramCommentStr
7973  function " . str_replace('.', '__', $operation) . "($paramStr) {
7974  \$params = array($paramArrayStr);
7975  return \$this->call('$operation', \$params, '" . $opData['namespace'] . "', '" . (isset($opData['soapAction']) ? $opData['soapAction'] : '') . "');
7976  }
7977  ";
7978  unset($paramStr);
7979  unset($paramCommentStr);
7980  }
7981  }
7982  $evalStr = 'class nusoap_proxy_' . $r . ' extends nusoap_client {
7983  ' . $evalStr . '
7984 }';
7985  return $evalStr;
7986  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
setError($str)
sets error string
Definition: nusoap.php:395
parses a WSDL file, allows access to it's data, other utility methods.
Definition: nusoap.php:4615
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
loadWSDL()
instantiate wsdl object and parse wsdl file
Definition: nusoap.php:7544
$r
+ Here is the call graph for this function:

◆ call()

nusoap_client::call (   $operation,
  $params = array(),
  $namespace = 'http://tempuri.org',
  $soapAction = '',
  $headers = false,
  $rpcParams = null,
  $style = 'rpc',
  $use = 'encoded' 
)

calls method, returns PHP native type

Parameters
string$operationSOAP server URL or path
mixed$paramsAn 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$namespaceoptional method namespace (WSDL can override)
string$soapActionoptional SOAPAction value (WSDL can override)
mixed$headersoptional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array
boolean$rpcParamsoptional (no longer used)
string$styleoptional (rpc|document) the style to use when serializing parameters (WSDL can override)
string$useoptional (encoded|literal) the use when serializing parameters (WSDL can override)
Returns
mixed response from SOAP call public

Definition at line 7333 of file nusoap.php.

References $namespace, $params, $payload, nusoap_base\$usedNamespaces, nusoap_base\appendDebug(), nusoap_base\clearDebug(), nusoap_base\debug(), nusoap_base\getDebug(), nusoap_base\getError(), nusoap_base\getPrefixFromNamespace(), send(), nusoap_base\serialize_val(), nusoap_base\serializeEnvelope(), wsdl\serializeRPCParameters(), nusoap_base\setError(), and nusoap_base\varDump().

7333  ://tempuri.org', $soapAction='', $headers=false, $rpcParams=null, $style='rpc', $use='encoded')
7334  {
7335  $this->operation = $operation;
7336  $this->fault = false;
7337  $this->setError('');
7338  $this->request = '';
7339  $this->response = '';
7340  $this->responseData = '';
7341  $this->faultstring = '';
7342  $this->faultcode = '';
7343  $this->opData = array();
7344 
7345  $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType");
7346  $this->appendDebug('params=' . $this->varDump($params));
7347  $this->appendDebug('headers=' . $this->varDump($headers));
7348  if ($headers) {
7349  $this->requestHeaders = $headers;
7350  }
7351  if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
7352  $this->loadWSDL();
7353  if ($this->getError()) {
7354  return false;
7355  }
7356  }
7357  // serialize parameters
7358  if ($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)) {
7359  // use WSDL for operation
7360  $this->opData = $opData;
7361  $this->debug("found operation");
7362  $this->appendDebug('opData=' . $this->varDump($opData));
7363  if (isset($opData['soapAction'])) {
7364  $soapAction = $opData['soapAction'];
7365  }
7366  if (! $this->forceEndpoint) {
7367  $this->endpoint = $opData['endpoint'];
7368  } else {
7369  $this->endpoint = $this->forceEndpoint;
7370  }
7371  $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace;
7372  $style = $opData['style'];
7373  $use = $opData['input']['use'];
7374  // add ns to ns array
7375  if ($namespace != '' && !isset($this->wsdl->namespaces[$namespace])) {
7376  $nsPrefix = 'ns' . rand(1000, 9999);
7377  $this->wsdl->namespaces[$nsPrefix] = $namespace;
7378  }
7379  $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace);
7380  // serialize payload
7381  if (is_string($params)) {
7382  $this->debug("serializing param string for WSDL operation $operation");
7383  $payload = $params;
7384  } elseif (is_array($params)) {
7385  $this->debug("serializing param array for WSDL operation $operation");
7386  $payload = $this->wsdl->serializeRPCParameters($operation, 'input', $params, $this->bindingType);
7387  } else {
7388  $this->debug('params must be array or string');
7389  $this->setError('params must be array or string');
7390  return false;
7391  }
7392  $usedNamespaces = $this->wsdl->usedNamespaces;
7393  if (isset($opData['input']['encodingStyle'])) {
7394  $encodingStyle = $opData['input']['encodingStyle'];
7395  } else {
7396  $encodingStyle = '';
7397  }
7398  $this->appendDebug($this->wsdl->getDebug());
7399  $this->wsdl->clearDebug();
7400  if ($errstr = $this->wsdl->getError()) {
7401  $this->debug('got wsdl error: ' . $errstr);
7402  $this->setError('wsdl error: ' . $errstr);
7403  return false;
7404  }
7405  } elseif ($this->endpointType == 'wsdl') {
7406  // operation not in WSDL
7407  $this->appendDebug($this->wsdl->getDebug());
7408  $this->wsdl->clearDebug();
7409  $this->setError('operation ' . $operation . ' not present.');
7410  $this->debug("operation '$operation' not present.");
7411  return false;
7412  } else {
7413  // no WSDL
7414  //$this->namespaces['ns1'] = $namespace;
7415  $nsPrefix = 'ns' . rand(1000, 9999);
7416  // serialize
7417  $payload = '';
7418  if (is_string($params)) {
7419  $this->debug("serializing param string for operation $operation");
7420  $payload = $params;
7421  } elseif (is_array($params)) {
7422  $this->debug("serializing param array for operation $operation");
7423  foreach ($params as $k => $v) {
7424  $payload .= $this->serialize_val($v, $k, false, false, false, false, $use);
7425  }
7426  } else {
7427  $this->debug('params must be array or string');
7428  $this->setError('params must be array or string');
7429  return false;
7430  }
7431  $usedNamespaces = array();
7432  if ($use == 'encoded') {
7433  $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
7434  } else {
7435  $encodingStyle = '';
7436  }
7437  }
7438  // wrap RPC calls with method element
7439  if ($style == 'rpc') {
7440  if ($use == 'literal') {
7441  $this->debug("wrapping RPC request with literal method element");
7442  if ($namespace) {
7443  // http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace
7444  $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" .
7445  $payload .
7446  "</$nsPrefix:$operation>";
7447  } else {
7448  $payload = "<$operation>" . $payload . "</$operation>";
7449  }
7450  } else {
7451  $this->debug("wrapping RPC request with encoded method element");
7452  if ($namespace) {
7453  $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" .
7454  $payload .
7455  "</$nsPrefix:$operation>";
7456  } else {
7457  $payload = "<$operation>" .
7458  $payload .
7459  "</$operation>";
7460  }
7461  }
7462  }
7463  // serialize envelope
7464  $soapmsg = $this->serializeEnvelope($payload, $this->requestHeaders, $usedNamespaces, $style, $use, $encodingStyle);
7465  $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle");
7466  $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000));
7467  // send
7468  $return = $this->send($this->getHTTPBody($soapmsg), $soapAction, $this->timeout, $this->response_timeout);
7469  if ($errstr = $this->getError()) {
7470  $this->debug('Error: ' . $errstr);
7471  return false;
7472  } else {
7473  $this->return = $return;
7474  $this->debug('sent message successfully and got a(n) ' . gettype($return));
7475  $this->appendDebug('return=' . $this->varDump($return));
7476 
7477  // fault?
7478  if (is_array($return) && isset($return['faultcode'])) {
7479  $this->debug('got fault');
7480  $this->setError($return['faultcode'] . ': ' . $return['faultstring']);
7481  $this->fault = true;
7482  foreach ($return as $k => $v) {
7483  $this->$k = $v;
7484  $this->debug("$k = $v<br>");
7485  }
7486  return $return;
7487  } elseif ($style == 'document') {
7488  // NOTE: if the response is defined to have multiple parts (i.e. unwrapped),
7489  // we are only going to return the first part here...sorry about that
7490  return $return;
7491  } else {
7492  // array of return values
7493  if (is_array($return)) {
7494  // multiple 'out' parameters, which we return wrapped up
7495  // in the array
7496  if (sizeof($return) > 1) {
7497  return $return;
7498  }
7499  // single 'out' parameter (normally the return value)
7500  $return = array_shift($return);
7501  $this->debug('return shifted value: ');
7502  $this->appendDebug($this->varDump($return));
7503  return $return;
7504  // nothing returned (ie, echoVoid)
7505  } else {
7506  return "";
7507  }
7508  }
7509  }
7510  }
if($err=$client->getError()) $namespace
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
setError($str)
sets error string
Definition: nusoap.php:395
& getDebug()
gets the current debug data for this instance
Definition: nusoap.php:332
parses a WSDL file, allows access to it&#39;s data, other utility methods.
Definition: nusoap.php:4615
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
if(count($parts) !=3) $payload
Definition: ltitoken.php:70
send($msg, $soapaction='', $timeout=0, $response_timeout=30)
send the SOAP message
Definition: nusoap.php:7588
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
serializeRPCParameters($operation, $direction, $parameters, $bindingType='soap')
serialize PHP values according to a WSDL message definition contrary to the method name...
Definition: nusoap.php:5732
getPrefixFromNamespace($ns)
returns the prefix for a given namespace (or prefix) or false if no prefixes registered for the given...
Definition: nusoap.php:872
serializeEnvelope($body, $headers=false, $namespaces=array(), $style='rpc', $use='encoded', $encodingStyle='http://schemas.xmlsoap.org/soap/encoding/')
serializes a message
Definition: nusoap.php:700
getOperationData($operation)
get available data pertaining to an operation
Definition: nusoap.php:7560
getHTTPBody($soapmsg)
gets the HTTP body for the current request.
Definition: nusoap.php:8007
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
loadWSDL()
instantiate wsdl object and parse wsdl file
Definition: nusoap.php:7544
clearDebug()
clears the current debug data for this instance
Definition: nusoap.php:319
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.
Definition: nusoap.php:433
+ Here is the call graph for this function:

◆ checkCookies()

nusoap_client::checkCookies ( )

checks all Cookies and delete those which are expired

Returns
boolean always return true private

Definition at line 8085 of file nusoap.php.

References nusoap_base\debug().

8086  {
8087  if (sizeof($this->cookies) == 0) {
8088  return true;
8089  }
8090  $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies');
8091  $curr_cookies = $this->cookies;
8092  $this->cookies = array();
8093  foreach ($curr_cookies as $cookie) {
8094  if (! is_array($cookie)) {
8095  $this->debug('Remove cookie that is not an array');
8096  continue;
8097  }
8098  if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
8099  if (strtotime($cookie['expires']) > time()) {
8100  $this->cookies[] = $cookie;
8101  } else {
8102  $this->debug('Remove expired cookie ' . $cookie['name']);
8103  }
8104  } else {
8105  $this->cookies[] = $cookie;
8106  }
8107  }
8108  $this->debug('checkCookie: ' . sizeof($this->cookies) . ' cookies left in array');
8109  return true;
8110  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ checkWSDL()

nusoap_client::checkWSDL ( )

check WSDL passed as an instance or pulled from an endpoint

private

Definition at line 7517 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\clearDebug(), nusoap_base\debug(), nusoap_base\getDebug(), nusoap_base\getError(), wsdl\getOperations(), and nusoap_base\setError().

7518  {
7519  $this->appendDebug($this->wsdl->getDebug());
7520  $this->wsdl->clearDebug();
7521  $this->debug('checkWSDL');
7522  // catch errors
7523  if ($errstr = $this->wsdl->getError()) {
7524  $this->debug('got wsdl error: ' . $errstr);
7525  $this->setError('wsdl error: ' . $errstr);
7526  } elseif ($this->operations = $this->wsdl->getOperations('soap')) {
7527  $this->bindingType = 'soap';
7528  $this->debug('got ' . count($this->operations) . ' operations from wsdl ' . $this->wsdlFile . ' for binding type ' . $this->bindingType);
7529  } elseif ($this->operations = $this->wsdl->getOperations('soap12')) {
7530  $this->bindingType = 'soap12';
7531  $this->debug('got ' . count($this->operations) . ' operations from wsdl ' . $this->wsdlFile . ' for binding type ' . $this->bindingType);
7532  $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************');
7533  } else {
7534  $this->debug('getOperations returned false');
7535  $this->setError('no operations defined in the WSDL document!');
7536  }
7537  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
setError($str)
sets error string
Definition: nusoap.php:395
& getDebug()
gets the current debug data for this instance
Definition: nusoap.php:332
parses a WSDL file, allows access to it&#39;s data, other utility methods.
Definition: nusoap.php:4615
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
getOperations($bindingType='soap')
returns an assoc array of operation names => operation data
Definition: nusoap.php:5192
clearDebug()
clears the current debug data for this instance
Definition: nusoap.php:319
+ Here is the call graph for this function:

◆ decodeUTF8()

nusoap_client::decodeUTF8 (   $bool)

Definition at line 8045 of file nusoap.php.

8046  {
8047  $this->decode_utf8 = $bool;
8048  return true;
8049  }

◆ getCookies()

nusoap_client::getCookies ( )

gets all Cookies

Returns
array with all internal cookies public

Definition at line 8074 of file nusoap.php.

8075  {
8076  return $this->cookies;
8077  }

◆ getDefaultRpcParams()

nusoap_client::getDefaultRpcParams ( )

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.

Returns
boolean public
Deprecated:

Definition at line 7857 of file nusoap.php.

7858  {
7859  return $this->defaultRpcParams;
7860  }

◆ getHeader()

nusoap_client::getHeader ( )

get the SOAP response Header (parsed)

Returns
mixed public

Definition at line 7770 of file nusoap.php.

7771  {
7772  return $this->responseHeader;
7773  }

◆ getHeaders()

nusoap_client::getHeaders ( )

get the SOAP response headers (namespace resolution incomplete)

Returns
string public

Definition at line 7759 of file nusoap.php.

7760  {
7761  return $this->responseHeaders;
7762  }

◆ getHTTPBody()

nusoap_client::getHTTPBody (   $soapmsg)

gets the HTTP body for the current request.

Parameters
string$soapmsgThe SOAP payload
Returns
string The HTTP body, which includes the SOAP payload private

Definition at line 8007 of file nusoap.php.

8008  {
8009  return $soapmsg;
8010  }

◆ getHTTPContentType()

nusoap_client::getHTTPContentType ( )

gets the HTTP content type for the current request.

Note: getHTTPBody must be called before this.

Returns
string the HTTP content type for the current request. private

Definition at line 8020 of file nusoap.php.

8021  {
8022  return 'text/xml';
8023  }

◆ getHTTPContentTypeCharset()

nusoap_client::getHTTPContentTypeCharset ( )

gets the HTTP content type charset for the current request.

returns false for non-text content types.

Note: getHTTPBody must be called before this.

Returns
string the HTTP content type charset for the current request. private

Definition at line 8034 of file nusoap.php.

References nusoap_base\$soap_defencoding.

8035  {
8036  return $this->soap_defencoding;
8037  }
$soap_defencoding
Definition: nusoap.php:164

◆ getOperationData()

nusoap_client::getOperationData (   $operation)

get available data pertaining to an operation

Parameters
string$operationoperation name
Returns
array array of data pertaining to the operation public

Definition at line 7560 of file nusoap.php.

References nusoap_base\debug(), and nusoap_base\getError().

7561  {
7562  if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
7563  $this->loadWSDL();
7564  if ($this->getError()) {
7565  return false;
7566  }
7567  }
7568  if (isset($this->operations[$operation])) {
7569  return $this->operations[$operation];
7570  }
7571  $this->debug("No data for operation: $operation");
7572  }
parses a WSDL file, allows access to it&#39;s data, other utility methods.
Definition: nusoap.php:4615
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
loadWSDL()
instantiate wsdl object and parse wsdl file
Definition: nusoap.php:7544
+ Here is the call graph for this function:

◆ getProxy()

nusoap_client::getProxy ( )

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

Returns
object soap_proxy object public

Definition at line 7885 of file nusoap.php.

References $r, nusoap_base\$soap_defencoding, nusoap_base\debug(), and nusoap_base\getError().

7886  {
7887  $r = rand();
7888  $evalStr = $this->_getProxyClassCode($r);
7889  //$this->debug("proxy class: $evalStr");
7890  if ($this->getError()) {
7891  $this->debug("Error from _getProxyClassCode, so return NULL");
7892  return null;
7893  }
7894  // eval the class
7895  eval($evalStr);
7896  // instantiate proxy object
7897  eval("\$proxy = new nusoap_proxy_$r('');");
7898  // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice
7899  $proxy->endpointType = 'wsdl';
7900  $proxy->wsdlFile = $this->wsdlFile;
7901  $proxy->wsdl = $this->wsdl;
7902  $proxy->operations = $this->operations;
7903  $proxy->defaultRpcParams = $this->defaultRpcParams;
7904  // transfer other state
7905  $proxy->soap_defencoding = $this->soap_defencoding;
7906  $proxy->username = $this->username;
7907  $proxy->password = $this->password;
7908  $proxy->authtype = $this->authtype;
7909  $proxy->certRequest = $this->certRequest;
7910  $proxy->requestHeaders = $this->requestHeaders;
7911  $proxy->endpoint = $this->endpoint;
7912  $proxy->forceEndpoint = $this->forceEndpoint;
7913  $proxy->proxyhost = $this->proxyhost;
7914  $proxy->proxyport = $this->proxyport;
7915  $proxy->proxyusername = $this->proxyusername;
7916  $proxy->proxypassword = $this->proxypassword;
7917  $proxy->http_encoding = $this->http_encoding;
7918  $proxy->timeout = $this->timeout;
7919  $proxy->response_timeout = $this->response_timeout;
7920  $proxy->persistentConnection = &$this->persistentConnection;
7921  $proxy->decode_utf8 = $this->decode_utf8;
7922  $proxy->curl_options = $this->curl_options;
7923  $proxy->bindingType = $this->bindingType;
7924  $proxy->use_curl = $this->use_curl;
7925  return $proxy;
7926  }
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
_getProxyClassCode($r)
dynamically creates proxy class code
Definition: nusoap.php:7934
$soap_defencoding
Definition: nusoap.php:164
$r
+ Here is the call graph for this function:

◆ getProxyClassCode()

nusoap_client::getProxyClassCode ( )

dynamically creates proxy class code

Returns
string PHP/NuSOAP code for the proxy class public

Definition at line 7994 of file nusoap.php.

References $r.

7995  {
7996  $r = rand();
7997  return $this->_getProxyClassCode($r);
7998  }
_getProxyClassCode($r)
dynamically creates proxy class code
Definition: nusoap.php:7934
$r

◆ loadWSDL()

nusoap_client::loadWSDL ( )

instantiate wsdl object and parse wsdl file

public

Definition at line 7544 of file nusoap.php.

References nusoap_base\debug(), wsdl\fetchWSDL(), and wsdl\setCredentials().

7545  {
7546  $this->debug('instantiating wsdl class with doc: ' . $this->wsdlFile);
7547  $this->wsdl = new wsdl('', $this->proxyhost, $this->proxyport, $this->proxyusername, $this->proxypassword, $this->timeout, $this->response_timeout, $this->curl_options, $this->use_curl);
7548  $this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest);
7549  $this->wsdl->fetchWSDL($this->wsdlFile);
7550  $this->checkWSDL();
7551  }
parses a WSDL file, allows access to it&#39;s data, other utility methods.
Definition: nusoap.php:4615
checkWSDL()
check WSDL passed as an instance or pulled from an endpoint
Definition: nusoap.php:7517
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
setCredentials($username, $password, $authtype='basic', $certRequest=array())
if authenticating, set user credentials here
Definition: nusoap.php:5168
fetchWSDL($wsdl)
fetches the WSDL document and parses it
Definition: nusoap.php:4695
+ Here is the call graph for this function:

◆ parseResponse()

nusoap_client::parseResponse (   $headers,
  $data 
)

processes SOAP message returned from server

Parameters
array$headersThe HTTP headers
string$dataunprocessed response data from server
Returns
mixed value of the message, decoded into a PHP type private

Definition at line 7668 of file nusoap.php.

References $data, nusoap_base\appendDebug(), nusoap_base\debug(), nusoap_base\setError(), and nusoap_base\varDump().

7669  {
7670  $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
7671  $this->appendDebug($this->varDump($headers));
7672  if (!strstr($headers['content-type'], 'text/xml')) {
7673  $this->setError('Response not of type text/xml: ' . $headers['content-type']);
7674  return false;
7675  }
7676  if (strpos($headers['content-type'], '=')) {
7677  $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
7678  $this->debug('Got response encoding: ' . $enc);
7679  if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) {
7680  $this->xml_encoding = strtoupper($enc);
7681  } else {
7682  $this->xml_encoding = 'US-ASCII';
7683  }
7684  } else {
7685  // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
7686  $this->xml_encoding = 'ISO-8859-1';
7687  }
7688  $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser');
7689  $parser = new nusoap_parser($data, $this->xml_encoding, $this->operation, $this->decode_utf8);
7690  // add parser debug data to our debug
7691  $this->appendDebug($parser->getDebug());
7692  // if parse errors
7693  if ($errstr = $parser->getError()) {
7694  $this->setError($errstr);
7695  // destroy the parser object
7696  unset($parser);
7697  return false;
7698  } else {
7699  // get SOAP headers
7700  $this->responseHeaders = $parser->getHeaders();
7701  // get SOAP headers
7702  $this->responseHeader = $parser->get_soapheader();
7703  // get decoded message
7704  $return = $parser->get_soapbody();
7705  // add document for doclit support
7706  $this->document = $parser->document;
7707  // destroy the parser object
7708  unset($parser);
7709  // return decode message
7710  return $return;
7711  }
7712  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
setError($str)
sets error string
Definition: nusoap.php:395
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
nusoap_parser class parses SOAP XML messages into native PHP values
Definition: nusoap.php:6543
+ Here is the call graph for this function:

◆ send()

nusoap_client::send (   $msg,
  $soapaction = '',
  $timeout = 0,
  $response_timeout = 30 
)

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.

Parameters
string$msga SOAPx4 soapmsg object
string$soapactionSOAPAction value
integer$timeoutset connection timeout in seconds
integer$response_timeoutset response timeout in seconds
Returns
mixed native PHP types. private

Definition at line 7588 of file nusoap.php.

References $http, nusoap_base\appendDebug(), nusoap_base\debug(), nusoap_base\getError(), and nusoap_base\setError().

7589  {
7590  $this->checkCookies();
7591  // detect transport
7592  switch (true) {
7593  // http(s)
7594  case preg_match('/^http/', $this->endpoint):
7595  $this->debug('transporting via HTTP');
7596  if ($this->persistentConnection == true && is_object($this->persistentConnection)) {
7598  } else {
7599  $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl);
7600  if ($this->persistentConnection) {
7601  $http->usePersistentConnection();
7602  }
7603  }
7604  $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset());
7605  $http->setSOAPAction($soapaction);
7606  if ($this->proxyhost && $this->proxyport) {
7607  $http->setProxy($this->proxyhost, $this->proxyport, $this->proxyusername, $this->proxypassword);
7608  }
7609  if ($this->authtype != '') {
7610  $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest);
7611  }
7612  if ($this->http_encoding != '') {
7613  $http->setEncoding($this->http_encoding);
7614  }
7615  $this->debug('sending message, length=' . strlen($msg));
7616  if (preg_match('/^http:/', $this->endpoint)) {
7617  //if(strpos($this->endpoint,'http:')){
7618  $this->responseData = $http->send($msg, $timeout, $response_timeout, $this->cookies);
7619  } elseif (preg_match('/^https/', $this->endpoint)) {
7620  //} elseif(strpos($this->endpoint,'https:')){
7621  //if(phpversion() == '4.3.0-dev'){
7622  //$response = $http->send($msg,$timeout,$response_timeout);
7623  //$this->request = $http->outgoing_payload;
7624  //$this->response = $http->incoming_payload;
7625  //} else
7626  $this->responseData = $http->sendHTTPS($msg, $timeout, $response_timeout, $this->cookies);
7627  } else {
7628  $this->setError('no http/s in endpoint url');
7629  }
7630  $this->request = $http->outgoing_payload;
7631  $this->response = $http->incoming_payload;
7632  $this->appendDebug($http->getDebug());
7633  $this->UpdateCookies($http->incoming_cookies);
7634 
7635  // save transport object if using persistent connections
7636  if ($this->persistentConnection) {
7637  $http->clearDebug();
7638  if (!is_object($this->persistentConnection)) {
7639  $this->persistentConnection = $http;
7640  }
7641  }
7642 
7643  if ($err = $http->getError()) {
7644  $this->setError('HTTP Error: ' . $err);
7645  return false;
7646  } elseif ($this->getError()) {
7647  return false;
7648  } else {
7649  $this->debug('got response, length=' . strlen($this->responseData) . ' type=' . $http->incoming_headers['content-type']);
7650  return $this->parseResponse($http->incoming_headers, $this->responseData);
7651  }
7652  break;
7653  default:
7654  $this->setError('no transport found, or selected transport is not yet supported!');
7655  return false;
7656  break;
7657  }
7658  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
setError($str)
sets error string
Definition: nusoap.php:395
transport class for sending/receiving data via HTTP and HTTPS NOTE: PHP must be compiled with the CUR...
Definition: nusoap.php:2185
parseResponse($headers, $data)
processes SOAP message returned from server
Definition: nusoap.php:7668
getHTTPContentTypeCharset()
gets the HTTP content type charset for the current request.
Definition: nusoap.php:8034
getError()
returns error string if present
Definition: nusoap.php:381
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
checkCookies()
checks all Cookies and delete those which are expired
Definition: nusoap.php:8085
getHTTPContentType()
gets the HTTP content type for the current request.
Definition: nusoap.php:8020
$http
Definition: raiseError.php:7
UpdateCookies($cookies)
updates the current cookies with a new set
Definition: nusoap.php:8119
+ Here is the call graph for this function:

◆ setCookie()

nusoap_client::setCookie (   $name,
  $value 
)

adds a new Cookie into $this->cookies array

Parameters
string$nameCookie Name
string$valueCookie Value
Returns
boolean if cookie-set was successful returns true, else false public

Definition at line 8059 of file nusoap.php.

8060  {
8061  if (strlen($name) == 0) {
8062  return false;
8063  }
8064  $this->cookies[] = array('name' => $name, 'value' => $value);
8065  return true;
8066  }

◆ setCredentials()

nusoap_client::setCredentials (   $username,
  $password,
  $authtype = 'basic',
  $certRequest = array() 
)

if authenticating, set user credentials here

Parameters
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) public

Definition at line 7801 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

7802  {
7803  $this->debug("setCredentials username=$username authtype=$authtype certRequest=");
7804  $this->appendDebug($this->varDump($certRequest));
7805  $this->username = $username;
7806  $this->password = $password;
7807  $this->authtype = $authtype;
7808  $this->certRequest = $certRequest;
7809  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ setCurlOption()

nusoap_client::setCurlOption (   $option,
  $value 
)

sets user-specified cURL options

Parameters
mixed$optionThe cURL option (always integer?)
mixed$valueThe cURL option value public

Definition at line 7721 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

7722  {
7723  $this->debug("setCurlOption option=$option, value=");
7724  $this->appendDebug($this->varDump($value));
7725  $this->curl_options[$option] = $value;
7726  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ setDefaultRpcParams()

nusoap_client::setDefaultRpcParams (   $rpcParams)

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.

Parameters
boolean$rpcParamspublic
Deprecated:

Definition at line 7873 of file nusoap.php.

7874  {
7875  $this->defaultRpcParams = $rpcParams;
7876  }

◆ setEndpoint()

nusoap_client::setEndpoint (   $endpoint)

sets the SOAP endpoint, which can override WSDL

Parameters
string$endpointThe endpoint URL to use, or empty string or false to prevent override public

Definition at line 7734 of file nusoap.php.

References nusoap_base\debug().

7735  {
7736  $this->debug("setEndpoint(\"$endpoint\")");
7737  $this->forceEndpoint = $endpoint;
7738  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ setHeaders()

nusoap_client::setHeaders (   $headers)

set the SOAP headers

Parameters
mixed$headersString of XML with SOAP header content, or array of soapval objects for SOAP headers public

Definition at line 7746 of file nusoap.php.

References nusoap_base\appendDebug(), nusoap_base\debug(), and nusoap_base\varDump().

7747  {
7748  $this->debug("setHeaders headers=");
7749  $this->appendDebug($this->varDump($headers));
7750  $this->requestHeaders = $headers;
7751  }
appendDebug($string)
adds debug data to the instance debug string without formatting
Definition: nusoap.php:305
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
varDump($data)
Returns a string with the output of var_dump.
Definition: nusoap.php:909
+ Here is the call graph for this function:

◆ setHTTPEncoding()

nusoap_client::setHTTPEncoding (   $enc = 'gzip,
deflate'   
)

use HTTP encoding

Parameters
string$encHTTP encoding public

Definition at line 7817 of file nusoap.php.

References nusoap_base\debug().

7818  {
7819  $this->debug("setHTTPEncoding(\"$enc\")");
7820  $this->http_encoding = $enc;
7821  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ setHTTPProxy()

nusoap_client::setHTTPProxy (   $proxyhost,
  $proxyport,
  $proxyusername = '',
  $proxypassword = '' 
)

set proxy info here

Parameters
string$proxyhost
string$proxyport
string$proxyusername
string$proxypasswordpublic

Definition at line 7784 of file nusoap.php.

7785  {
7786  $this->proxyhost = $proxyhost;
7787  $this->proxyport = $proxyport;
7788  $this->proxyusername = $proxyusername;
7789  $this->proxypassword = $proxypassword;
7790  }

◆ setUseCURL()

nusoap_client::setUseCURL (   $use)

Set whether to try to use cURL connections if possible.

Parameters
boolean$useWhether to try to use cURL public

Definition at line 7829 of file nusoap.php.

References nusoap_base\debug().

7830  {
7831  $this->debug("setUseCURL($use)");
7832  $this->use_curl = $use;
7833  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ UpdateCookies()

nusoap_client::UpdateCookies (   $cookies)

updates the current cookies with a new set

Parameters
array$cookiesnew cookies with which to update current ones
Returns
boolean always return true private

Definition at line 8119 of file nusoap.php.

References $path, and nusoap_base\debug().

8120  {
8121  if (sizeof($this->cookies) == 0) {
8122  // no existing cookies: take whatever is new
8123  if (sizeof($cookies) > 0) {
8124  $this->debug('Setting new cookie(s)');
8125  $this->cookies = $cookies;
8126  }
8127  return true;
8128  }
8129  if (sizeof($cookies) == 0) {
8130  // no new cookies: keep what we've got
8131  return true;
8132  }
8133  // merge
8134  foreach ($cookies as $newCookie) {
8135  if (!is_array($newCookie)) {
8136  continue;
8137  }
8138  if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) {
8139  continue;
8140  }
8141  $newName = $newCookie['name'];
8142 
8143  $found = false;
8144  for ($i = 0; $i < count($this->cookies); $i++) {
8145  $cookie = $this->cookies[$i];
8146  if (!is_array($cookie)) {
8147  continue;
8148  }
8149  if (!isset($cookie['name'])) {
8150  continue;
8151  }
8152  if ($newName != $cookie['name']) {
8153  continue;
8154  }
8155  $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN';
8156  $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN';
8157  if ($newDomain != $domain) {
8158  continue;
8159  }
8160  $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH';
8161  $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH';
8162  if ($newPath != $path) {
8163  continue;
8164  }
8165  $this->cookies[$i] = $newCookie;
8166  $found = true;
8167  $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']);
8168  break;
8169  }
8170  if (! $found) {
8171  $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']);
8172  $this->cookies[] = $newCookie;
8173  }
8174  }
8175  return true;
8176  }
$path
Definition: ltiservices.php:32
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

◆ useHTTPPersistentConnection()

nusoap_client::useHTTPPersistentConnection ( )

use HTTP persistent connections if possible

public

Definition at line 7840 of file nusoap.php.

References nusoap_base\debug().

7841  {
7842  $this->debug("useHTTPPersistentConnection");
7843  $this->persistentConnection = true;
7844  }
debug($string)
adds debug data to the instance debug string with formatting
Definition: nusoap.php:292
+ Here is the call graph for this function:

Field Documentation

◆ $authtype

nusoap_client::$authtype = ''

Definition at line 7207 of file nusoap.php.

◆ $bindingType

nusoap_client::$bindingType = ''

Definition at line 7233 of file nusoap.php.

◆ $certRequest

nusoap_client::$certRequest = array()

Definition at line 7208 of file nusoap.php.

◆ $cookies

nusoap_client::$cookies = array()

Definition at line 7229 of file nusoap.php.

◆ $curl_options

nusoap_client::$curl_options = array()

Definition at line 7232 of file nusoap.php.

◆ $decode_utf8

nusoap_client::$decode_utf8 = true

Definition at line 7230 of file nusoap.php.

◆ $defaultRpcParams

nusoap_client::$defaultRpcParams = false

Definition at line 7225 of file nusoap.php.

◆ $document

nusoap_client::$document = ''

Definition at line 7212 of file nusoap.php.

◆ $endpoint

nusoap_client::$endpoint

Definition at line 7213 of file nusoap.php.

◆ $endpointType

nusoap_client::$endpointType = ''

Definition at line 7223 of file nusoap.php.

◆ $fault

nusoap_client::$fault

Definition at line 7243 of file nusoap.php.

◆ $faultcode

nusoap_client::$faultcode

Definition at line 7248 of file nusoap.php.

◆ $faultdetail

nusoap_client::$faultdetail

Definition at line 7258 of file nusoap.php.

◆ $faultstring

nusoap_client::$faultstring

Definition at line 7253 of file nusoap.php.

◆ $forceEndpoint

nusoap_client::$forceEndpoint = ''

Definition at line 7214 of file nusoap.php.

◆ $http_encoding

nusoap_client::$http_encoding = false

Definition at line 7220 of file nusoap.php.

◆ $operations

nusoap_client::$operations = array()

Definition at line 7231 of file nusoap.php.

◆ $password

nusoap_client::$password = ''

Definition at line 7206 of file nusoap.php.

◆ $persistentConnection

nusoap_client::$persistentConnection = false

Definition at line 7224 of file nusoap.php.

◆ $proxyhost

nusoap_client::$proxyhost = ''

Definition at line 7215 of file nusoap.php.

◆ $proxypassword

nusoap_client::$proxypassword = ''

Definition at line 7218 of file nusoap.php.

◆ $proxyport

nusoap_client::$proxyport = ''

Definition at line 7216 of file nusoap.php.

◆ $proxyusername

nusoap_client::$proxyusername = ''

Definition at line 7217 of file nusoap.php.

◆ $request

nusoap_client::$request = ''

Definition at line 7226 of file nusoap.php.

◆ $requestHeaders

nusoap_client::$requestHeaders = false

Definition at line 7209 of file nusoap.php.

◆ $response

nusoap_client::$response = ''

Definition at line 7227 of file nusoap.php.

◆ $response_timeout

nusoap_client::$response_timeout = 30

Definition at line 7222 of file nusoap.php.

◆ $responseData

nusoap_client::$responseData = ''

Definition at line 7228 of file nusoap.php.

◆ $responseHeader

nusoap_client::$responseHeader = null

Definition at line 7211 of file nusoap.php.

◆ $responseHeaders

nusoap_client::$responseHeaders = ''

Definition at line 7210 of file nusoap.php.

◆ $timeout

nusoap_client::$timeout = 0

Definition at line 7221 of file nusoap.php.

◆ $use_curl

nusoap_client::$use_curl = false

Definition at line 7234 of file nusoap.php.

◆ $username

nusoap_client::$username = ''

Definition at line 7205 of file nusoap.php.

◆ $xml_encoding

nusoap_client::$xml_encoding = ''

Definition at line 7219 of file nusoap.php.


The documentation for this class was generated from the following file: