@@ -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; // 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; // 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 |
@@ -4819,7 +4819,7 @@ discard block |
||
4819 | 4819 | // Schema imports |
4820 | 4820 | foreach ($this->schemas as $ns => $list) { |
4821 | 4821 | foreach ($list as $xs) { |
4822 | - $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
4822 | + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
4823 | 4823 | foreach ($xs->imports as $ns2 => $list2) { |
4824 | 4824 | for ($ii = 0, $iiMax = count($list2); $ii < $iiMax; $ii++) { |
4825 | 4825 | if (!$list2[$ii]['loaded']) { |
@@ -4845,7 +4845,7 @@ discard block |
||
4845 | 4845 | } |
4846 | 4846 | } |
4847 | 4847 | // WSDL imports |
4848 | - $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
4848 | + $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! |
|
4849 | 4849 | foreach ($this->import as $ns => $list) { |
4850 | 4850 | for ($ii = 0, $iiMax = count($list); $ii < $iiMax; $ii++) { |
4851 | 4851 | if (!$list[$ii]['loaded']) { |
@@ -4876,12 +4876,10 @@ discard block |
||
4876 | 4876 | $this->debug('post-parse data gathering for ' . $operation); |
4877 | 4877 | $this->bindings[$binding]['operations'][$operation]['input'] = |
4878 | 4878 | isset($this->bindings[$binding]['operations'][$operation]['input']) ? |
4879 | - array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[$bindingData['portType']][$operation]['input']) : |
|
4880 | - $this->portTypes[$bindingData['portType']][$operation]['input']; |
|
4879 | + array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[$bindingData['portType']][$operation]['input']) : $this->portTypes[$bindingData['portType']][$operation]['input']; |
|
4881 | 4880 | $this->bindings[$binding]['operations'][$operation]['output'] = |
4882 | 4881 | isset($this->bindings[$binding]['operations'][$operation]['output']) ? |
4883 | - array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[$bindingData['portType']][$operation]['output']) : |
|
4884 | - $this->portTypes[$bindingData['portType']][$operation]['output']; |
|
4882 | + array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[$bindingData['portType']][$operation]['output']) : $this->portTypes[$bindingData['portType']][$operation]['output']; |
|
4885 | 4883 | if (isset($this->messages[$this->bindings[$binding]['operations'][$operation]['input']['message']])) { |
4886 | 4884 | $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[$this->bindings[$binding]['operations'][$operation]['input']['message']]; |
4887 | 4885 | } |
@@ -6693,7 +6691,7 @@ discard block |
||
6693 | 6691 | public $root_struct_name = ''; |
6694 | 6692 | public $root_struct_namespace = ''; |
6695 | 6693 | public $root_header = ''; |
6696 | - public $document = ''; // incoming SOAP body (text) |
|
6694 | + public $document = ''; // incoming SOAP body (text) |
|
6697 | 6695 | // determines where in the message we are (envelope,header,body,method) |
6698 | 6696 | public $status = ''; |
6699 | 6697 | public $position = 0; |
@@ -6708,9 +6706,9 @@ discard block |
||
6708 | 6706 | public $fault_detail = ''; |
6709 | 6707 | public $depth_array = []; |
6710 | 6708 | public $debug_flag = true; |
6711 | - public $soapresponse; // parsed SOAP Body |
|
6712 | - public $soapheader; // parsed SOAP Header |
|
6713 | - public $responseHeaders = ''; // incoming SOAP headers (text) |
|
6709 | + public $soapresponse; // parsed SOAP Body |
|
6710 | + public $soapheader; // parsed SOAP Header |
|
6711 | + public $responseHeaders = ''; // incoming SOAP headers (text) |
|
6714 | 6712 | public $body_position = 0; |
6715 | 6713 | // for multiref parsing: |
6716 | 6714 | // array of id => pos |
@@ -7005,7 +7003,7 @@ discard block |
||
7005 | 7003 | // add placeholder to href array |
7006 | 7004 | $this->multirefs[$id][$pos] = 'placeholder'; |
7007 | 7005 | // add set a reference to it as the result value |
7008 | - $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; |
|
7006 | + $this->message[$pos]['result'] = & $this->multirefs[$id][$pos]; |
|
7009 | 7007 | // build complexType values |
7010 | 7008 | } elseif ('' != $this->message[$pos]['children']) { |
7011 | 7009 | // if result has already been generated (struct/array) |
@@ -7352,37 +7350,37 @@ discard block |
||
7352 | 7350 | */ |
7353 | 7351 | class nusoap_client extends nusoap_base |
7354 | 7352 | { |
7355 | - public $username = ''; // Username for HTTP authentication |
|
7356 | - public $password = ''; // Password for HTTP authentication |
|
7357 | - public $authtype = ''; // Type of HTTP authentication |
|
7358 | - public $certRequest = []; // Certificate for HTTP SSL authentication |
|
7359 | - public $requestHeaders = false; // SOAP headers in request (text) |
|
7360 | - public $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) |
|
7361 | - public $responseHeader; // SOAP Header from response (parsed) |
|
7362 | - public $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) |
|
7353 | + public $username = ''; // Username for HTTP authentication |
|
7354 | + public $password = ''; // Password for HTTP authentication |
|
7355 | + public $authtype = ''; // Type of HTTP authentication |
|
7356 | + public $certRequest = []; // Certificate for HTTP SSL authentication |
|
7357 | + public $requestHeaders = false; // SOAP headers in request (text) |
|
7358 | + public $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) |
|
7359 | + public $responseHeader; // SOAP Header from response (parsed) |
|
7360 | + public $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) |
|
7363 | 7361 | public $endpoint; |
7364 | - public $forceEndpoint = ''; // overrides WSDL endpoint |
|
7362 | + public $forceEndpoint = ''; // overrides WSDL endpoint |
|
7365 | 7363 | public $proxyhost = ''; |
7366 | 7364 | public $proxyport = ''; |
7367 | 7365 | public $proxyusername = ''; |
7368 | 7366 | public $proxypassword = ''; |
7369 | - public $portName = ''; // port name to use in WSDL |
|
7370 | - public $xml_encoding = ''; // character set encoding of incoming (response) messages |
|
7367 | + public $portName = ''; // port name to use in WSDL |
|
7368 | + public $xml_encoding = ''; // character set encoding of incoming (response) messages |
|
7371 | 7369 | public $http_encoding = false; |
7372 | - public $timeout = 0; // HTTP connection timeout |
|
7373 | - public $response_timeout = 30; // HTTP response timeout |
|
7374 | - public $endpointType = ''; // soap|wsdl, empty for WSDL initialization error |
|
7370 | + public $timeout = 0; // HTTP connection timeout |
|
7371 | + public $response_timeout = 30; // HTTP response timeout |
|
7372 | + public $endpointType = ''; // soap|wsdl, empty for WSDL initialization error |
|
7375 | 7373 | public $persistentConnection = false; |
7376 | - public $defaultRpcParams = false; // This is no longer used |
|
7377 | - public $request = ''; // HTTP request |
|
7378 | - public $response = ''; // HTTP response |
|
7379 | - public $responseData = ''; // SOAP payload of response |
|
7380 | - public $cookies = []; // Cookies from response or for request |
|
7381 | - public $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() |
|
7382 | - public $operations = []; // WSDL operations, empty for WSDL initialization error |
|
7383 | - public $curl_options = []; // User-specified cURL options |
|
7384 | - public $bindingType = ''; // WSDL operation binding type |
|
7385 | - public $use_curl = false; // whether to always try to use cURL |
|
7374 | + public $defaultRpcParams = false; // This is no longer used |
|
7375 | + public $request = ''; // HTTP request |
|
7376 | + public $response = ''; // HTTP response |
|
7377 | + public $responseData = ''; // SOAP payload of response |
|
7378 | + public $cookies = []; // Cookies from response or for request |
|
7379 | + public $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() |
|
7380 | + public $operations = []; // WSDL operations, empty for WSDL initialization error |
|
7381 | + public $curl_options = []; // User-specified cURL options |
|
7382 | + public $bindingType = ''; // WSDL operation binding type |
|
7383 | + public $use_curl = false; // whether to always try to use cURL |
|
7386 | 7384 | |
7387 | 7385 | /* |
7388 | 7386 | * fault related variables |
@@ -7758,7 +7756,7 @@ discard block |
||
7758 | 7756 | case preg_match('/^http/', $this->endpoint): |
7759 | 7757 | $this->debug('transporting via HTTP'); |
7760 | 7758 | if (true == $this->persistentConnection && is_object($this->persistentConnection)) { |
7761 | - $http =& $this->persistentConnection; |
|
7759 | + $http = & $this->persistentConnection; |
|
7762 | 7760 | } else { |
7763 | 7761 | $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl); |
7764 | 7762 | if ($this->persistentConnection) { |