@@ -946,12 +946,12 @@ discard block |
||
| 946 | 946 | } |
| 947 | 947 | if ($utc) { |
| 948 | 948 | $pattern = '/' . |
| 949 | - '([0-9]{4})-' . // centuries & years CCYY- |
|
| 950 | - '([0-9]{2})-' . // months MM- |
|
| 951 | - '([0-9]{2})' . // days DD |
|
| 952 | - 'T' . // separator T |
|
| 953 | - '([0-9]{2}):' . // hours hh: |
|
| 954 | - '([0-9]{2}):' . // minutes mm: |
|
| 949 | + '([0-9]{4})-' . // centuries & years CCYY- |
|
| 950 | + '([0-9]{2})-' . // months MM- |
|
| 951 | + '([0-9]{2})' . // days DD |
|
| 952 | + 'T' . // separator T |
|
| 953 | + '([0-9]{2}):' . // hours hh: |
|
| 954 | + '([0-9]{2}):' . // minutes mm: |
|
| 955 | 955 | '([0-9]{2})(\.[0-9]*)?' . // seconds ss.ss... |
| 956 | 956 | '(Z|[+\-][0-9]{2}:?[0-9]{2})?' . // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's |
| 957 | 957 | '/'; |
@@ -975,12 +975,12 @@ discard block |
||
| 975 | 975 | function iso8601_to_timestamp($datestr) |
| 976 | 976 | { |
| 977 | 977 | $pattern = '/' . |
| 978 | - '([0-9]{4})-' . // centuries & years CCYY- |
|
| 979 | - '([0-9]{2})-' . // months MM- |
|
| 980 | - '([0-9]{2})' . // days DD |
|
| 981 | - 'T' . // separator T |
|
| 982 | - '([0-9]{2}):' . // hours hh: |
|
| 983 | - '([0-9]{2}):' . // minutes mm: |
|
| 978 | + '([0-9]{4})-' . // centuries & years CCYY- |
|
| 979 | + '([0-9]{2})-' . // months MM- |
|
| 980 | + '([0-9]{2})' . // days DD |
|
| 981 | + 'T' . // separator T |
|
| 982 | + '([0-9]{2}):' . // hours hh: |
|
| 983 | + '([0-9]{2}):' . // minutes mm: |
|
| 984 | 984 | '([0-9]{2})(\.[0-9]+)?' . // seconds ss.ss... |
| 985 | 985 | '(Z|[+\-][0-9]{2}:?[0-9]{2})?' . // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's |
| 986 | 986 | '/'; |
@@ -1018,7 +1018,7 @@ discard block |
||
| 1018 | 1018 | |
| 1019 | 1019 | do { |
| 1020 | 1020 | $stop = gettimeofday(); |
| 1021 | - $timePassed = 1000000 * ($stop['sec'] - $start['sec']) |
|
| 1021 | + $timePassed = 1000000*($stop['sec'] - $start['sec']) |
|
| 1022 | 1022 | + $stop['usec'] - $start['usec']; |
| 1023 | 1023 | } while ($timePassed < $usec); |
| 1024 | 1024 | } |
@@ -2232,18 +2232,18 @@ discard block |
||
| 2232 | 2232 | public $incoming_cookies = []; |
| 2233 | 2233 | public $outgoing_payload = ''; |
| 2234 | 2234 | public $incoming_payload = ''; |
| 2235 | - public $response_status_line; // HTTP response status line |
|
| 2235 | + public $response_status_line; // HTTP response status line |
|
| 2236 | 2236 | public $useSOAPAction = true; |
| 2237 | 2237 | public $persistentConnection = false; |
| 2238 | - public $ch = false; // cURL handle |
|
| 2239 | - public $ch_options = []; // cURL custom options |
|
| 2240 | - public $use_curl = false; // force cURL use |
|
| 2241 | - public $proxy = null; // proxy information (associative array) |
|
| 2238 | + public $ch = false; // cURL handle |
|
| 2239 | + public $ch_options = []; // cURL custom options |
|
| 2240 | + public $use_curl = false; // force cURL use |
|
| 2241 | + public $proxy = null; // proxy information (associative array) |
|
| 2242 | 2242 | public $username = ''; |
| 2243 | 2243 | public $password = ''; |
| 2244 | 2244 | public $authtype = ''; |
| 2245 | 2245 | public $digestRequest = []; |
| 2246 | - public $certRequest = []; // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) |
|
| 2246 | + public $certRequest = []; // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional) |
|
| 2247 | 2247 | // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' |
| 2248 | 2248 | // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' |
| 2249 | 2249 | // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' |
@@ -3099,7 +3099,7 @@ discard block |
||
| 3099 | 3099 | |
| 3100 | 3100 | // loop until msg has been received |
| 3101 | 3101 | if (isset($this->incoming_headers['transfer-encoding']) && 'chunked' == strtolower($this->incoming_headers['transfer-encoding'])) { |
| 3102 | - $content_length = 2147483647; // ignore any content-length header |
|
| 3102 | + $content_length = 2147483647; // ignore any content-length header |
|
| 3103 | 3103 | $chunked = true; |
| 3104 | 3104 | $this->debug('want to read chunked content'); |
| 3105 | 3105 | } elseif (isset($this->incoming_headers['content-length'])) { |
@@ -3279,7 +3279,7 @@ discard block |
||
| 3279 | 3279 | $this->response_status_line = $header_array[0]; |
| 3280 | 3280 | $arr = explode(' ', $this->response_status_line, 3); |
| 3281 | 3281 | $http_version = $arr[0]; |
| 3282 | - $http_status = (int)$arr[1]; |
|
| 3282 | + $http_status = (int) $arr[1]; |
|
| 3283 | 3283 | $http_reason = count($arr) > 2 ? $arr[2] : ''; |
| 3284 | 3284 | |
| 3285 | 3285 | // see if we need to resend the request with http digest authentication |
@@ -4190,7 +4190,7 @@ discard block |
||
| 4190 | 4190 | } else { |
| 4191 | 4191 | if ('' == $class) { |
| 4192 | 4192 | $this->debug('in invoke_method, calling function using call_user_func_array()'); |
| 4193 | - $call_arg = $this->methodname; // straight assignment changes $this->methodname to lower case after call_user_func_array() |
|
| 4193 | + $call_arg = $this->methodname; // straight assignment changes $this->methodname to lower case after call_user_func_array() |
|
| 4194 | 4194 | } elseif ('..' == $delim) { |
| 4195 | 4195 | $this->debug('in invoke_method, calling class method using call_user_func_array()'); |
| 4196 | 4196 | $call_arg = [$class, $method]; |
@@ -4757,13 +4757,13 @@ discard block |
||
| 4757 | 4757 | public $proxypassword = ''; |
| 4758 | 4758 | public $timeout = 0; |
| 4759 | 4759 | public $response_timeout = 30; |
| 4760 | - public $curl_options = []; // User-specified cURL options |
|
| 4761 | - public $use_curl = false; // whether to always try to use cURL |
|
| 4760 | + public $curl_options = []; // User-specified cURL options |
|
| 4761 | + public $use_curl = false; // whether to always try to use cURL |
|
| 4762 | 4762 | // for HTTP authentication |
| 4763 | - public $username = ''; // Username for HTTP authentication |
|
| 4764 | - public $password = ''; // Password for HTTP authentication |
|
| 4765 | - public $authtype = ''; // Type of HTTP authentication |
|
| 4766 | - public $certRequest = []; // Certificate for HTTP SSL authentication |
|
| 4763 | + public $username = ''; // Username for HTTP authentication |
|
| 4764 | + public $password = ''; // Password for HTTP authentication |
|
| 4765 | + public $authtype = ''; // Type of HTTP authentication |
|
| 4766 | + public $certRequest = []; // Certificate for HTTP SSL authentication |
|
| 4767 | 4767 | |
| 4768 | 4768 | /** |
| 4769 | 4769 | * constructor |
@@ -4818,7 +4818,7 @@ discard block |
||
| 4818 | 4818 | // Schema imports |
| 4819 | 4819 | foreach ($this->schemas as $ns => $list) { |
| 4820 | 4820 | foreach ($list as $xs) { |
| 4821 | - $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
| 4821 | + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
| 4822 | 4822 | foreach ($xs->imports as $ns2 => $list2) { |
| 4823 | 4823 | for ($ii = 0, $iiMax = count($list2); $ii < $iiMax; $ii++) { |
| 4824 | 4824 | if (!$list2[$ii]['loaded']) { |
@@ -4844,7 +4844,7 @@ discard block |
||
| 4844 | 4844 | } |
| 4845 | 4845 | } |
| 4846 | 4846 | // WSDL imports |
| 4847 | - $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
| 4847 | + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
| 4848 | 4848 | foreach ($this->import as $ns => $list) { |
| 4849 | 4849 | for ($ii = 0, $iiMax = count($list); $ii < $iiMax; $ii++) { |
| 4850 | 4850 | if (!$list[$ii]['loaded']) { |
@@ -4875,12 +4875,10 @@ discard block |
||
| 4875 | 4875 | $this->debug('post-parse data gathering for ' . $operation); |
| 4876 | 4876 | $this->bindings[$binding]['operations'][$operation]['input'] = |
| 4877 | 4877 | isset($this->bindings[$binding]['operations'][$operation]['input']) ? |
| 4878 | - array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[$bindingData['portType']][$operation]['input']) : |
|
| 4879 | - $this->portTypes[$bindingData['portType']][$operation]['input']; |
|
| 4878 | + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[$bindingData['portType']][$operation]['input']) : $this->portTypes[$bindingData['portType']][$operation]['input']; |
|
| 4880 | 4879 | $this->bindings[$binding]['operations'][$operation]['output'] = |
| 4881 | 4880 | isset($this->bindings[$binding]['operations'][$operation]['output']) ? |
| 4882 | - array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[$bindingData['portType']][$operation]['output']) : |
|
| 4883 | - $this->portTypes[$bindingData['portType']][$operation]['output']; |
|
| 4881 | + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[$bindingData['portType']][$operation]['output']) : $this->portTypes[$bindingData['portType']][$operation]['output']; |
|
| 4884 | 4882 | if (isset($this->messages[$this->bindings[$binding]['operations'][$operation]['input']['message']])) { |
| 4885 | 4883 | $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[$this->bindings[$binding]['operations'][$operation]['input']['message']]; |
| 4886 | 4884 | } |
@@ -6688,7 +6686,7 @@ discard block |
||
| 6688 | 6686 | public $root_struct_name = ''; |
| 6689 | 6687 | public $root_struct_namespace = ''; |
| 6690 | 6688 | public $root_header = ''; |
| 6691 | - public $document = ''; // incoming SOAP body (text) |
|
| 6689 | + public $document = ''; // incoming SOAP body (text) |
|
| 6692 | 6690 | // determines where in the message we are (envelope,header,body,method) |
| 6693 | 6691 | public $status = ''; |
| 6694 | 6692 | public $position = 0; |
@@ -6703,9 +6701,9 @@ discard block |
||
| 6703 | 6701 | public $fault_detail = ''; |
| 6704 | 6702 | public $depth_array = []; |
| 6705 | 6703 | public $debug_flag = true; |
| 6706 | - public $soapresponse = null; // parsed SOAP Body |
|
| 6707 | - public $soapheader = null; // parsed SOAP Header |
|
| 6708 | - public $responseHeaders = ''; // incoming SOAP headers (text) |
|
| 6704 | + public $soapresponse = null; // parsed SOAP Body |
|
| 6705 | + public $soapheader = null; // parsed SOAP Header |
|
| 6706 | + public $responseHeaders = ''; // incoming SOAP headers (text) |
|
| 6709 | 6707 | public $body_position = 0; |
| 6710 | 6708 | // for multiref parsing: |
| 6711 | 6709 | // array of id => pos |
@@ -7000,7 +6998,7 @@ discard block |
||
| 7000 | 6998 | // add placeholder to href array |
| 7001 | 6999 | $this->multirefs[$id][$pos] = 'placeholder'; |
| 7002 | 7000 | // add set a reference to it as the result value |
| 7003 | - $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; |
|
| 7001 | + $this->message[$pos]['result'] = & $this->multirefs[$id][$pos]; |
|
| 7004 | 7002 | // build complexType values |
| 7005 | 7003 | } elseif ('' != $this->message[$pos]['children']) { |
| 7006 | 7004 | // if result has already been generated (struct/array) |
@@ -7347,37 +7345,37 @@ discard block |
||
| 7347 | 7345 | */ |
| 7348 | 7346 | class nusoap_client extends nusoap_base |
| 7349 | 7347 | { |
| 7350 | - public $username = ''; // Username for HTTP authentication |
|
| 7351 | - public $password = ''; // Password for HTTP authentication |
|
| 7352 | - public $authtype = ''; // Type of HTTP authentication |
|
| 7353 | - public $certRequest = []; // Certificate for HTTP SSL authentication |
|
| 7354 | - public $requestHeaders = false; // SOAP headers in request (text) |
|
| 7355 | - public $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) |
|
| 7356 | - public $responseHeader = null; // SOAP Header from response (parsed) |
|
| 7357 | - public $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) |
|
| 7348 | + public $username = ''; // Username for HTTP authentication |
|
| 7349 | + public $password = ''; // Password for HTTP authentication |
|
| 7350 | + public $authtype = ''; // Type of HTTP authentication |
|
| 7351 | + public $certRequest = []; // Certificate for HTTP SSL authentication |
|
| 7352 | + public $requestHeaders = false; // SOAP headers in request (text) |
|
| 7353 | + public $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) |
|
| 7354 | + public $responseHeader = null; // SOAP Header from response (parsed) |
|
| 7355 | + public $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) |
|
| 7358 | 7356 | public $endpoint; |
| 7359 | - public $forceEndpoint = ''; // overrides WSDL endpoint |
|
| 7357 | + public $forceEndpoint = ''; // overrides WSDL endpoint |
|
| 7360 | 7358 | public $proxyhost = ''; |
| 7361 | 7359 | public $proxyport = ''; |
| 7362 | 7360 | public $proxyusername = ''; |
| 7363 | 7361 | public $proxypassword = ''; |
| 7364 | - public $portName = ''; // port name to use in WSDL |
|
| 7365 | - public $xml_encoding = ''; // character set encoding of incoming (response) messages |
|
| 7362 | + public $portName = ''; // port name to use in WSDL |
|
| 7363 | + public $xml_encoding = ''; // character set encoding of incoming (response) messages |
|
| 7366 | 7364 | public $http_encoding = false; |
| 7367 | - public $timeout = 0; // HTTP connection timeout |
|
| 7368 | - public $response_timeout = 30; // HTTP response timeout |
|
| 7369 | - public $endpointType = ''; // soap|wsdl, empty for WSDL initialization error |
|
| 7365 | + public $timeout = 0; // HTTP connection timeout |
|
| 7366 | + public $response_timeout = 30; // HTTP response timeout |
|
| 7367 | + public $endpointType = ''; // soap|wsdl, empty for WSDL initialization error |
|
| 7370 | 7368 | public $persistentConnection = false; |
| 7371 | - public $defaultRpcParams = false; // This is no longer used |
|
| 7372 | - public $request = ''; // HTTP request |
|
| 7373 | - public $response = ''; // HTTP response |
|
| 7374 | - public $responseData = ''; // SOAP payload of response |
|
| 7375 | - public $cookies = []; // Cookies from response or for request |
|
| 7376 | - public $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() |
|
| 7377 | - public $operations = []; // WSDL operations, empty for WSDL initialization error |
|
| 7378 | - public $curl_options = []; // User-specified cURL options |
|
| 7379 | - public $bindingType = ''; // WSDL operation binding type |
|
| 7380 | - public $use_curl = false; // whether to always try to use cURL |
|
| 7369 | + public $defaultRpcParams = false; // This is no longer used |
|
| 7370 | + public $request = ''; // HTTP request |
|
| 7371 | + public $response = ''; // HTTP response |
|
| 7372 | + public $responseData = ''; // SOAP payload of response |
|
| 7373 | + public $cookies = []; // Cookies from response or for request |
|
| 7374 | + public $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() |
|
| 7375 | + public $operations = []; // WSDL operations, empty for WSDL initialization error |
|
| 7376 | + public $curl_options = []; // User-specified cURL options |
|
| 7377 | + public $bindingType = ''; // WSDL operation binding type |
|
| 7378 | + public $use_curl = false; // whether to always try to use cURL |
|
| 7381 | 7379 | |
| 7382 | 7380 | /* |
| 7383 | 7381 | * fault related variables |
@@ -7753,7 +7751,7 @@ discard block |
||
| 7753 | 7751 | case preg_match('/^http/', $this->endpoint): |
| 7754 | 7752 | $this->debug('transporting via HTTP'); |
| 7755 | 7753 | if (true == $this->persistentConnection && is_object($this->persistentConnection)) { |
| 7756 | - $http =& $this->persistentConnection; |
|
| 7754 | + $http = & $this->persistentConnection; |
|
| 7757 | 7755 | } else { |
| 7758 | 7756 | $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); |
| 7759 | 7757 | if ($this->persistentConnection) { |