Lines Matching +full:- +full:- +full:debug
6 NuSOAP - Web Services Toolkit for PHP
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 nusoap-general@lists.sourceforge.net
44 * SOAP 1.1 (http://www.w3.org/TR/2000/NOTE-SOAP-20000508/)
45 * WSDL 1.1 (http://www.w3.org/TR/2001/NOTE-wsdl-20010315)
46 * SOAP Messages With Attachments (http://www.w3.org/TR/SOAP-attachments)
47 * XML 1.0 (http://www.w3.org/TR/2006/REC-xml-20060816/)
48 * Namespaces in XML 1.0 (http://www.w3.org/TR/2006/REC-xml-names-20060816/)
49 * XML Schema 1.0 (http://www.w3.org/TR/xmlschema-0/)
51 * RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1
66 // optional add-on classes
74 // cf. http://www.webkreator.com/php/techniques/php-static-class-variables.html
75 $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 9;
116 … * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)
131 * the debug level for this instance
152 var $soap_defencoding = 'ISO-8859-1';
153 //var $soap_defencoding = 'UTF-8';
164 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/',
166 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
167 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/'
200 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
204 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
207 'http://xml.apache.org/xml-soap' => array('Map')
227 $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel;
231 * gets the global debug level, which applies to future instances
233 * @return integer Debug level 0-9, where 0 turns off
237 return $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel;
241 * sets the global debug level, which applies to future instances
243 * @param int $level Debug level 0-9, where 0 turns off
247 $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = $level;
251 * gets the debug level for this instance
253 * @return int Debug level 0-9, where 0 turns off
257 return $this->debugLevel;
261 * sets the debug level for this instance
263 * @param int $level Debug level 0-9, where 0 turns off
267 $this->debugLevel = $level;
271 * adds debug data to the instance debug string with formatting
273 * @param string $string debug data
276 function debug($string){ function in nusoap_base
277 if ($this->debugLevel > 0) {
278 $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n");
283 * adds debug data to the instance debug string without formatting
285 * @param string $string debug data
289 if ($this->debugLevel > 0) {
292 $this->debug_str .= $string;
297 * clears the current debug data for this instance
304 $this->debug_str = '';
308 * gets the current debug data for this instance
310 * @return debug data
316 return $this->debug_str;
320 * gets the current debug data for this instance as an XML comment
321 * this may change the contents of the debug data
323 * @return debug data as an XML comment
329 while (strpos($this->debug_str, '--')) {
330 $this->debug_str = str_replace('--', '- -', $this->debug_str);
332 $ret = "<!--\n" . $this->debug_str . "\n-->";
343 if ($this->charencoding) {
360 if($this->error_str != ''){
361 return $this->error_str;
373 $this->error_str = $str;
409 …$this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$u…
410 $this->appendDebug('value=' . $this->varDump($val));
411 $this->appendDebug('attributes=' . $this->varDump($attributes));
414 $this->debug("serialize_val: serialize soapval");
415 $xml = $val->serialize($use);
416 $this->appendDebug($val->getDebug());
417 $val->clearDebug();
418 $this->debug("serialize_val of soapval returning $xml");
435 if($type_ns != '' && $type_ns == $this->namespaces['xsd']){
447 $atts .= " $k=\"".$this->expandEntities($v).'"';
452 $this->debug("serialize_val: serialize null");
456 $this->debug("serialize_val returning $xml");
465 $this->debug("serialize_val returning $xml");
469 // serialize if an xsd built-in primitive type
470 if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){
471 $this->debug("serialize_val: serialize xsd built-in primitive type");
479 $val = $this->expandEntities($val);
483 $this->debug("serialize_val returning $xml");
487 $this->debug("serialize_val returning $xml");
495 $this->debug("serialize_val: serialize boolean");
508 $this->debug("serialize_val: serialize int");
516 $this->debug("serialize_val: serialize float");
524 $this->debug("serialize_val: serialize string");
525 $val = $this->expandEntities($val);
533 $this->debug("serialize_val: serialize object");
535 $this->debug("serialize_val: serialize soapval object");
536 $pXml = $val->serialize($use);
537 $this->appendDebug($val->getDebug());
538 $val->clearDebug();
542 $this->debug("In serialize_val, used class name $name as element name");
544 …$this->debug("In serialize_val, do not override name $name for element name for class " . get_clas…
547 …$pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->ser…
564 $valueType = $this->isArraySimpleOrStruct($val);
566 $this->debug("serialize_val: serialize array");
571 $tt_ns = $v->type_ns;
572 $tt = $v->type;
574 $tt = $this->isArraySimpleOrStruct($v);
580 $xml .= $this->serialize_val($v,'item',false,false,false,false,$use);
585 } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) {
591 $array_typename = 'SOAP-ENC:Array';
596 if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){
612 …$type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\"";
621 $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\"";
628 $this->debug("serialize_val: serialize struct");
641 if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') {
643 $xml .= $this->serialize_val($k,'key',false,false,false,false,$use);
644 $xml .= $this->serialize_val($v,'value',false,false,false,false,$use);
647 $xml .= $this->serialize_val($v,$k,false,false,false,false,$use);
654 $this->debug("serialize_val: serialize unknown");
658 $this->debug("serialize_val returning $xml");
676 // if $this->soap_defencoding is UTF-8. Not doing this automatically allows
677 // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1
679 …$this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . sub…
680 $this->debug("headers:");
681 $this->appendDebug($this->varDump($headers));
682 $this->debug("namespaces:");
683 $this->appendDebug($this->varDump($namespaces));
687 foreach(array_merge($this->namespaces,$namespaces) as $k => $v){
691 $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string";
700 $xml .= $this->serialize_val($v, false, false, false, false, false, $use);
702 $xml .= $this->serialize_val($v, $k, false, false, false, false, $use);
706 $this->debug("In serializeEnvelope, serialized array of headers to $headers");
708 $headers = "<SOAP-ENV:Header>".$headers."</SOAP-ENV:Header>";
712 '<?xml version="1.0" encoding="'.$this->soap_defencoding .'"?'.">".
713 '<SOAP-ENV:Envelope'.$ns_string.">".
715 "<SOAP-ENV:Body>".
717 "</SOAP-ENV:Body>".
718 "</SOAP-ENV:Envelope>";
743 //$this->xdebug("Contract $qname");
749 $p = $this->getPrefixFromNamespace($ns);
773 if(isset($this->namespaces[$prefix])){
774 return $this->namespaces[$prefix].':'.$name;
824 if (isset($this->namespaces[$prefix])) {
825 return $this->namespaces[$prefix];
827 //$this->setError("No namespace registered for prefix '$prefix'");
840 foreach ($this->namespaces as $p => $n) {
842 $this->usedNamespaces[$p] = $n;
864 return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
889 return $this->varDump($this);
905 $datestr = date('Y-m-d\TH:i:sO',$timestamp);
908 '([0-9]{4})-'. // centuries & years CCYY-
909 '([0-9]{2})-'. // months MM-
910 '([0-9]{2})'. // days DD
912 '([0-9]{2}):'. // hours hh:
913 '([0-9]{2}):'. // minutes mm:
914 '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
915 '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
918 …return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs…
934 '([0-9]{4})-'. // centuries & years CCYY-
935 '([0-9]{2})-'. // months MM-
936 '([0-9]{2})'. // days DD
938 '([0-9]{2}):'. // hours hh:
939 '([0-9]{2}):'. // minutes mm:
940 '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
941 '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
947 $m = substr($regs[8],strlen($regs[8])-2,2);
948 if($op == '-'){
952 $regs[4] = $regs[4] - $h;
953 $regs[5] = $regs[5] - $m;
957 // return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
977 $timePassed = 1000000 * ($stop['sec'] - $start['sec'])
978 + $stop['usec'] - $start['usec'];