Lines Matching +full:- +full:- +full:debug

16 * echo $soapclient->call( string methodname [ ,array parameters] );
55 var $curl_options = array(); // User-specified cURL options
99 $this->endpoint = $endpoint;
100 $this->proxyhost = $proxyhost;
101 $this->proxyport = $proxyport;
102 $this->proxyusername = $proxyusername;
103 $this->proxypassword = $proxypassword;
104 $this->timeout = $timeout;
105 $this->response_timeout = $response_timeout;
107 $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
108 $this->appendDebug('endpoint=' . $this->varDump($endpoint));
113 $this->wsdl = $endpoint;
114 $this->endpoint = $this->wsdl->wsdl;
115 $this->wsdlFile = $this->endpoint;
116 $this->debug('existing wsdl instance created from ' . $this->endpoint);
117 $this->checkWSDL();
119 $this->wsdlFile = $this->endpoint;
120 $this->wsdl = null;
121 $this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint);
123 $this->endpointType = 'wsdl';
125 $this->debug("instantiate SOAP with endpoint at $endpoint");
126 $this->endpointType = 'soap';
156 $this->operation = $operation;
157 $this->fault = false;
158 $this->setError('');
159 $this->request = '';
160 $this->response = '';
161 $this->responseData = '';
162 $this->faultstring = '';
163 $this->faultcode = '';
164 $this->opData = array();
166 …is->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rp…
167 $this->appendDebug('params=' . $this->varDump($params));
168 $this->appendDebug('headers=' . $this->varDump($headers));
170 $this->requestHeaders = $headers;
172 if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
173 $this->loadWSDL();
174 if ($this->getError())
178 if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){
180 $this->opData = $opData;
181 $this->debug("found operation");
182 $this->appendDebug('opData=' . $this->varDump($opData));
186 if (! $this->forceEndpoint) {
187 $this->endpoint = $opData['endpoint'];
189 $this->endpoint = $this->forceEndpoint;
195 if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){
197 $this->wsdl->namespaces[$nsPrefix] = $namespace;
199 $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace);
202 $this->debug("serializing param string for WSDL operation $operation");
205 $this->debug("serializing param array for WSDL operation $operation");
206 $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType);
208 $this->debug('params must be array or string');
209 $this->setError('params must be array or string');
212 $usedNamespaces = $this->wsdl->usedNamespaces;
218 $this->appendDebug($this->wsdl->getDebug());
219 $this->wsdl->clearDebug();
220 if ($errstr = $this->wsdl->getError()) {
221 $this->debug('got wsdl error: '.$errstr);
222 $this->setError('wsdl error: '.$errstr);
225 } elseif($this->endpointType == 'wsdl') {
227 $this->appendDebug($this->wsdl->getDebug());
228 $this->wsdl->clearDebug();
229 $this->setError( 'operation '.$operation.' not present.');
230 $this->debug("operation '$operation' not present.");
234 //$this->namespaces['ns1'] = $namespace;
239 $this->debug("serializing param string for operation $operation");
242 $this->debug("serializing param array for operation $operation");
244 $payload .= $this->serialize_val($v,$k,false,false,false,false,$use);
247 $this->debug('params must be array or string');
248 $this->setError('params must be array or string');
261 $this->debug("wrapping RPC request with literal method element");
263 …// http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor e…
271 $this->debug("wrapping RPC request with encoded method element");
284 …$soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$en…
285 …$this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style…
286 …$this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($s…
288 …$return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_time…
289 if($errstr = $this->getError()){
290 $this->debug('Error: '.$errstr);
293 $this->return = $return;
294 $this->debug('sent message successfully and got a(n) '.gettype($return));
295 $this->appendDebug('return=' . $this->varDump($return));
299 $this->debug('got fault');
300 $this->setError($return['faultcode'].': '.$return['faultstring']);
301 $this->fault = true;
303 $this->$k = $v;
304 $this->debug("$k = $v<br>");
321 $this->debug('return shifted value: ');
322 $this->appendDebug($this->varDump($return));
338 $this->appendDebug($this->wsdl->getDebug());
339 $this->wsdl->clearDebug();
340 $this->debug('checkWSDL');
342 if ($errstr = $this->wsdl->getError()) {
343 $this->debug('got wsdl error: '.$errstr);
344 $this->setError('wsdl error: '.$errstr);
345 } elseif ($this->operations = $this->wsdl->getOperations('soap')) {
346 $this->bindingType = 'soap';
347 …$this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for bindin…
348 } elseif ($this->operations = $this->wsdl->getOperations('soap12')) {
349 $this->bindingType = 'soap12';
350 …$this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for bindin…
351 $this->debug('**************** WARNING: SOAP 1.2 BINDING *****************');
353 $this->debug('getOperations returned false');
354 $this->setError('no operations defined in the WSDL document!');
364 $this->debug('instantiating wsdl class with doc: '.$this->wsdlFile);
365->wsdl =& new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,…
366 …$this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest);
367 $this->wsdl->fetchWSDL($this->wsdlFile);
368 $this->checkWSDL();
379 if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
380 $this->loadWSDL();
381 if ($this->getError())
384 if(isset($this->operations[$operation])){
385 return $this->operations[$operation];
387 $this->debug("No data for operation: $operation");
405 $this->checkCookies();
409 case ereg('^http',$this->endpoint):
410 $this->debug('transporting via HTTP');
411 if($this->persistentConnection == true && is_object($this->persistentConnection)){
412 $http =& $this->persistentConnection;
414 $http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl);
415 if ($this->persistentConnection) {
416 $http->usePersistentConnection();
419 $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset());
420 $http->setSOAPAction($soapaction);
421 if($this->proxyhost && $this->proxyport){
422 $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
424 if($this->authtype != '') {
425 …$http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certReque…
427 if($this->http_encoding != ''){
428 $http->setEncoding($this->http_encoding);
430 $this->debug('sending message, length='.strlen($msg));
431 if(ereg('^http:',$this->endpoint)){
432 //if(strpos($this->endpoint,'http:')){
433 $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies);
434 } elseif(ereg('^https',$this->endpoint)){
435 //} elseif(strpos($this->endpoint,'https:')){
436 //if(phpversion() == '4.3.0-dev'){
437 //$response = $http->send($msg,$timeout,$response_timeout);
438 //$this->request = $http->outgoing_payload;
439 //$this->response = $http->incoming_payload;
441 $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies);
443 $this->setError('no http/s in endpoint url');
445 $this->request = $http->outgoing_payload;
446 $this->response = $http->incoming_payload;
447 $this->appendDebug($http->getDebug());
448 $this->UpdateCookies($http->incoming_cookies);
451 if ($this->persistentConnection) {
452 $http->clearDebug();
453 if (!is_object($this->persistentConnection)) {
454 $this->persistentConnection = $http;
458 if($err = $http->getError()){
459 $this->setError('HTTP Error: '.$err);
461 } elseif($this->getError()){
464 …$this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers…
465 return $this->parseResponse($http->incoming_headers, $this->responseData);
469 $this->setError('no transport found, or selected transport is not yet supported!');
484 $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
485 $this->appendDebug($this->varDump($headers));
486 if (!strstr($headers['content-type'], 'text/xml')) {
487 $this->setError('Response not of type text/xml: ' . $headers['content-type']);
490 if (strpos($headers['content-type'], '=')) {
491 $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
492 $this->debug('Got response encoding: ' . $enc);
493 if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
494 $this->xml_encoding = strtoupper($enc);
496 $this->xml_encoding = 'US-ASCII';
499 // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
500 $this->xml_encoding = 'ISO-8859-1';
502 $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser');
503 $parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8);
504 // add parser debug data to our debug
505 $this->appendDebug($parser->getDebug());
507 if($errstr = $parser->getError()){
508 $this->setError( $errstr);
514 $this->responseHeaders = $parser->getHeaders();
516 $this->responseHeader = $parser->get_soapheader();
518 $return = $parser->get_soapbody();
520 $this->document = $parser->document;
529 * sets user-specified cURL options
536 $this->debug("setCurlOption option=$option, value=");
537 $this->appendDebug($this->varDump($value));
538 $this->curl_options[$option] = $value;
548 $this->debug("setEndpoint(\"$endpoint\")");
549 $this->forceEndpoint = $endpoint;
559 $this->debug("setHeaders headers=");
560 $this->appendDebug($this->varDump($headers));
561 $this->requestHeaders = $headers;
571 return $this->responseHeaders;
581 return $this->responseHeader;
594 $this->proxyhost = $proxyhost;
595 $this->proxyport = $proxyport;
596 $this->proxyusername = $proxyusername;
597 $this->proxypassword = $proxypassword;
610 $this->debug("setCredentials username=$username authtype=$authtype certRequest=");
611 $this->appendDebug($this->varDump($certRequest));
612 $this->username = $username;
613 $this->password = $password;
614 $this->authtype = $authtype;
615 $this->certRequest = $certRequest;
625 $this->debug("setHTTPEncoding(\"$enc\")");
626 $this->http_encoding = $enc;
636 $this->debug("setUseCURL($use)");
637 $this->use_curl = $use;
646 $this->debug("useHTTPPersistentConnection");
647 $this->persistentConnection = true;
662 return $this->defaultRpcParams;
677 $this->defaultRpcParams = $rpcParams;
689 $evalStr = $this->_getProxyClassCode($r);
690 //$this->debug("proxy class: $evalStr");
691 if ($this->getError()) {
692 $this->debug("Error from _getProxyClassCode, so return NULL");
700 $proxy->endpointType = 'wsdl';
701 $proxy->wsdlFile = $this->wsdlFile;
702 $proxy->wsdl = $this->wsdl;
703 $proxy->operations = $this->operations;
704 $proxy->defaultRpcParams = $this->defaultRpcParams;
706 $proxy->soap_defencoding = $this->soap_defencoding;
707 $proxy->username = $this->username;
708 $proxy->password = $this->password;
709 $proxy->authtype = $this->authtype;
710 $proxy->certRequest = $this->certRequest;
711 $proxy->requestHeaders = $this->requestHeaders;
712 $proxy->endpoint = $this->endpoint;
713 $proxy->forceEndpoint = $this->forceEndpoint;
714 $proxy->proxyhost = $this->proxyhost;
715 $proxy->proxyport = $this->proxyport;
716 $proxy->proxyusername = $this->proxyusername;
717 $proxy->proxypassword = $this->proxypassword;
718 $proxy->http_encoding = $this->http_encoding;
719 $proxy->timeout = $this->timeout;
720 $proxy->response_timeout = $this->response_timeout;
721 $proxy->persistentConnection = &$this->persistentConnection;
722 $proxy->decode_utf8 = $this->decode_utf8;
723 $proxy->curl_options = $this->curl_options;
724 $proxy->bindingType = $this->bindingType;
725 $proxy->use_curl = $this->use_curl;
736 $this->debug("in getProxy endpointType=$this->endpointType");
737 $this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
738 if ($this->endpointType != 'wsdl') {
740 $this->setError($evalStr);
744 if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
745 $this->loadWSDL();
746 if ($this->getError()) {
747 return "echo \"" . $this->getError() . "\";";
751 foreach ($this->operations as $operation => $opData) {
763 $paramStr = substr($paramStr, 0, strlen($paramStr)-2);
764 $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2);
765 $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2);
775 …return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAct…
796 return $this->_getProxyClassCode($r);
824 * returns false for non-text content types.
832 return $this->soap_defencoding;
842 $this->decode_utf8 = $bool;
847 * adds a new Cookie into $this->cookies array
851 * @return boolean if cookie-set was successful returns true, else false
858 $this->cookies[] = array('name' => $name, 'value' => $value);
869 return $this->cookies;
879 if (sizeof($this->cookies) == 0) {
882 $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies');
883 $curr_cookies = $this->cookies;
884 $this->cookies = array();
887 $this->debug('Remove cookie that is not an array');
892 $this->cookies[] = $cookie;
894 $this->debug('Remove expired cookie ' . $cookie['name']);
897 $this->cookies[] = $cookie;
900 $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array');
912 if (sizeof($this->cookies) == 0) {
915 $this->debug('Setting new cookie(s)');
916 $this->cookies = $cookies;
935 for ($i = 0; $i < count($this->cookies); $i++) {
936 $cookie = $this->cookies[$i];
956 $this->cookies[$i] = $newCookie;
958 $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']);
962 $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']);
963 $this->cookies[] = $newCookie;