Lines Matching +full:- +full:- +full:debug
50 var $curl_options = array(); // User-specified cURL options
68 * @param array $curl_options user-specified cURL options
74 $this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
75 $this->proxyhost = $proxyhost;
76 $this->proxyport = $proxyport;
77 $this->proxyusername = $proxyusername;
78 $this->proxypassword = $proxypassword;
79 $this->timeout = $timeout;
80 $this->response_timeout = $response_timeout;
82 $this->curl_options = $curl_options;
83 $this->use_curl = $use_curl;
84 $this->fetchWSDL($wsdl);
93 $this->debug("parse and process WSDL path=$wsdl");
94 $this->wsdl = $wsdl;
96 if ($this->wsdl != "") {
97 $this->parseWSDL($this->wsdl);
100 // TODO: handle imports more properly, grabbing them in-line and nesting them
106 foreach ($this->schemas as $ns => $list) {
108 $wsdlparts = parse_url($this->wsdl); // this is bogusly simple!
109 foreach ($xs->imports as $ns2 => $list2) {
112 $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;
121 $this->parseWSDL($url);
126 $this->debug("Unexpected scenario: empty URL for unloaded import");
134 $wsdlparts = parse_url($this->wsdl); // this is bogusly simple!
135 foreach ($this->import as $ns => $list) {
138 $this->import[$ns][$ii]['loaded'] = true;
147 $this->parseWSDL($url);
152 $this->debug("Unexpected scenario: empty URL for unloaded import");
159 foreach($this->bindings as $binding => $bindingData) {
162 $this->debug('post-parse data gathering for ' . $operation);
163 $this->bindings[$binding]['operations'][$operation]['input'] =
164 isset($this->bindings[$binding]['operations'][$operation]['input']) ?
165 …array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindi…
166 $this->portTypes[ $bindingData['portType'] ][$operation]['input'];
167 $this->bindings[$binding]['operations'][$operation]['output'] =
168 isset($this->bindings[$binding]['operations'][$operation]['output']) ?
169 …array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bind…
170 $this->portTypes[ $bindingData['portType'] ][$operation]['output'];
171 …if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] …
172 …$this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bi…
174 …if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message']…
175 …$this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->b…
178 …if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['st…
179 … $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style'];
181 …$this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']…
182 …->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $binding…
183 …$this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) …
196 $this->debug("parse WSDL at path=$wsdl");
199 $this->debug('no wsdl passed to parseWSDL()!!');
200 $this->setError('no wsdl passed to parseWSDL()!!');
208 $this->debug('getting WSDL http(s) URL ' . $wsdl);
210 $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl);
211 $tr->request_method = 'GET';
212 $tr->useSOAPAction = false;
213 if($this->proxyhost && $this->proxyport){
214 $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
216 if ($this->authtype != '') {
217 …$tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest…
219 $tr->setEncoding('gzip, deflate');
220 $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout);
221 //$this->debug("WSDL request\n" . $tr->outgoing_payload);
222 //$this->debug("WSDL response\n" . $tr->incoming_payload);
223 $this->appendDebug($tr->getDebug());
225 if($err = $tr->getError() ){
227 $this->debug($errstr);
228 $this->setError($errstr);
233 $this->debug("got WSDL URL");
241 $this->debug('getting WSDL file ' . $path);
250 $this->debug($errstr);
251 $this->setError($errstr);
255 $this->debug('Parse WSDL');
258 $this->parser = xml_parser_create();
261 xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
263 xml_set_object($this->parser, $this);
265 xml_set_element_handler($this->parser, 'start_element', 'end_element');
266 xml_set_character_data_handler($this->parser, 'character_data');
268 if (!xml_parse($this->parser, $wsdl_string, true)) {
273 xml_get_current_line_number($this->parser),
274 xml_error_string(xml_get_error_code($this->parser))
276 $this->debug($errstr);
277 $this->debug("XML payload:\n" . $wsdl_string);
278 $this->setError($errstr);
282 xml_parser_free($this->parser);
283 $this->debug('Parsing WSDL done');
285 if($this->getError()){
292 * start-element handler
301 if ($this->status == 'schema') {
302 $this->currentSchema->schemaStartElement($parser, $name, $attrs);
303 $this->appendDebug($this->currentSchema->getDebug());
304 $this->currentSchema->clearDebug();
306 $this->debug('Parsing WSDL schema');
307 …// $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalP…
308 $this->status = 'schema';
309 $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces);
310 $this->currentSchema->schemaStartElement($parser, $name, $attrs);
311 $this->appendDebug($this->currentSchema->getDebug());
312 $this->currentSchema->clearDebug();
315 $pos = $this->position++;
316 $depth = $this->depth++;
318 $this->depth_array[$depth] = $pos;
319 $this->message[$pos] = array('cdata' => '');
326 $this->namespaces[$ns_prefix] = $v;
328 $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v;
331 $this->XMLSchemaVersion = $v;
332 $this->namespaces['xsi'] = $v . '-instance';
338 $k = strpos($k, ':') ? $this->expandQname($k) : $k;
340 $v = strpos($v, ':') ? $this->expandQname($v) : $v;
353 $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : '';
359 switch ($this->status) {
363 …$this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(…
364 $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type'];
367 …$this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implo…
368 $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^';
375 $this->currentPortOperation = $attrs['name'];
376 … $this->debug("portType $this->currentPortType operation: $this->currentPortOperation");
378 …$this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrde…
382 $this->documentation = true;
386 $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : '';
387 … $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m;
396 $this->bindings[$this->currentBinding]['prefix'] = $prefix;
398 …$this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attr…
401 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['he…
405 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $att…
408 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['s…
411 $this->currentOperation = $attrs['name'];
412 $this->debug("current binding operation: $this->currentOperation");
413 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['na…
414 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->…
415 …->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this…
419 $this->opStatus = 'input';
422 $this->opStatus = 'output';
425 …if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opS…
426 …->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_…
428 …$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $…
436 $this->currentPort = $attrs['name'];
437 $this->debug('current port: ' . $this->currentPort);
438 $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']);
442 $this->ports[$this->currentPort]['location'] = $attrs['location'];
443 $this->ports[$this->currentPort]['bindingType'] = $namespace;
444 … $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace;
445 … $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location'];
454 … $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false);
455 …$this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($t…
457 … $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
458 if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
459 $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace'];
461 …$this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$…
466 // $this->status = 'schema';
469 $this->status = 'message';
470 $this->messages[$attrs['name']] = array();
471 $this->currentMessage = $attrs['name'];
474 $this->status = 'portType';
475 $this->portTypes[$attrs['name']] = array();
476 $this->currentPortType = $attrs['name'];
482 $this->currentBinding = $this->getLocalPart($attrs['name']);
484 $this->currentBinding = $attrs['name'];
486 $this->status = 'binding';
487 $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']);
488 $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']);
492 $this->serviceName = $attrs['name'];
493 $this->status = 'service';
494 $this->debug('current service: ' . $this->serviceName);
498 $this->wsdl_info[$name] = $value;
506 * end-element handler
515 $this->status = "";
516 $this->appendDebug($this->currentSchema->getDebug());
517 $this->currentSchema->clearDebug();
518 $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema;
519 $this->debug('Parsing WSDL schema done');
521 if ($this->status == 'schema') {
522 $this->currentSchema->schemaEndElement($parser, $name);
525 $this->depth--;
528 if ($this->documentation) {
530 …//$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->…
531 $this->documentation = false;
544 $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0;
545 if (isset($this->message[$pos]['cdata'])) {
546 $this->message[$pos]['cdata'] .= $data;
548 if ($this->documentation) {
549 $this->documentation .= $data;
563 $this->debug("setCredentials username=$username authtype=$authtype certRequest=");
564 $this->appendDebug($this->varDump($certRequest));
565 $this->username = $username;
566 $this->password = $password;
567 $this->authtype = $authtype;
568 $this->certRequest = $certRequest;
573 if (is_array($this->bindings[$binding])) {
574 return $this->bindings[$binding];
593 foreach($this->ports as $port => $portData) {
596 //$this->debug("getOperations for port $port");
597 //$this->debug("port data: " . $this->varDump($portData));
598 //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ]));
600 if (isset($this->bindings[ $portData['binding'] ]['operations'])) {
601 $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']);
624 foreach($this->ports as $port => $portData) {
628 //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
629 foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) {
632 $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation];
655 foreach($this->ports as $port => $portData) {
659 foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
687 $this->debug("in getTypeDef: type=$type, ns=$ns");
688 if ((! $ns) && isset($this->namespaces['tns'])) {
689 $ns = $this->namespaces['tns'];
690 $this->debug("in getTypeDef: type namespace forced to $ns");
692 if (!isset($this->schemas[$ns])) {
693 foreach ($this->schemas as $ns0 => $schema0) {
695 $this->debug("in getTypeDef: replacing schema namespace $ns with $ns0");
701 if (isset($this->schemas[$ns])) {
702 $this->debug("in getTypeDef: have schema for namespace $ns");
703 for ($i = 0; $i < count($this->schemas[$ns]); $i++) {
704 $xs = &$this->schemas[$ns][$i];
705 $t = $xs->getTypeDef($type);
706 //$this->appendDebug($xs->getDebug());
707 //$xs->clearDebug();
713 $etype = $this->getTypeDef($uqType, $ns);
715 $this->debug("found type for [element] $type:");
716 $this->debug($this->varDump($etype));
732 $this->debug("in getTypeDef: do not have schema for namespace $ns");
750 $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
754 <html><head><title>NuSOAP: '.$this->serviceName.'</title>
756 …body { font-family: arial; color: #000000; background-color: #ffffff; margin: 0px 0px 0px 0px; }
757 p { font-family: arial; color: #000000; margin-top: 0px; margin-bottom: 12px; }
758 …pre { background-color: silver; padding: 5px; font-family: Courier New; font-size: x-small; color:…
759 ul { margin-top: 10px; margin-left: 20px; }
760 li { list-style-type: none; margin-top: 10px; color: #000000; }
762 margin-left: 0px; padding-bottom: 2em; }
764 padding-top: 10px; padding-bottom: 10px; padding-left: 15px; font-size: .70em;
765 margin-top: 10px; margin-left: 0px; color: #000000;
766 background-color: #ccccff; width: 20%; margin-left: 20px; margin-top: 20px; }
768 font-family: arial; font-size: 26px; color: #ffffff;
769 background-color: #999999; width: 105%; margin-left: 0px;
770 padding-top: 10px; padding-bottom: 10px; padding-left: 15px;}
772 position: absolute; visibility: hidden; z-index: 200; left: 250px; top: 100px;
773 font-family: arial; overflow: hidden; width: 600;
774 padding: 20px; font-size: 10px; background-color: #999999;
775 layer-background-color:#FFFFFF; }
776 a,a:active { color: charcoal; font-weight: bold; }
777 a:visited { color: #666666; font-weight: bold; }
778 a:hover { color: cc3300; font-weight: bold; }
781 <!--
782 // POP-UP CAPTIONS...
787 this.opera5=this.agent.indexOf("Opera 5")>-1
788 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
789 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
792 this.mac=this.agent.indexOf("Mac")>-1
824 //-->
830 <div class=title>'.$this->serviceName.'</div>
835 foreach($this->getOperations() as $op => $data){
871 * @param mixed $debug whether to put debug=1 in endpoint URL
875 function serialize($debug = 0) argument
877 $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
879 foreach($this->namespaces as $k => $v) {
882 // 10.9.02 - add poulter fix for wsdl and tns declarations
883 if (isset($this->namespaces['wsdl'])) {
884 $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\"";
886 if (isset($this->namespaces['tns'])) {
887 $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\"";
891 if (sizeof($this->import) > 0) {
892 foreach($this->import as $ns => $list) {
903 if (count($this->schemas)>=1) {
905 foreach ($this->schemas as $ns => $list) {
907 $xml .= $xs->serializeSchema();
913 if (count($this->messages) >= 1) {
914 foreach($this->messages as $msgName => $msgParts) {
918 // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>';
920 $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType));
921 } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) {
922 // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>';
925 foreach($this->typemap as $ns => $types) {
927 $typePrefix = $this->getPrefixFromNamespace($ns);
934 $ns = $this->getNamespaceFromPrefix($typePrefix);
935 $localPart = $this->getLocalPart($partType);
936 $typeDef = $this->getTypeDef($localPart, $ns);
939 if (substr($localPart, -1) == '^') {
940 $localPart = substr($localPart, 0, -1);
952 if (count($this->bindings) >= 1) {
955 foreach($this->bindings as $bindingName => $attrs) {
993 $xml .= "\n<service name=\"" . $this->serviceName . '">';
994 if (count($this->ports) >= 1) {
995 foreach($this->ports as $pName => $attrs) {
997 …$xml .= "\n" . ' <soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . …
1007 * when they are expect to be wrapped, Microsoft-style.
1015 $this->debug("in parametersMatchWrapped type=$type, parameters=");
1016 $this->appendDebug($this->varDump($parameters));
1018 // split type into namespace:unqualified-type
1022 $this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns");
1023 if ($this->getNamespaceFromPrefix($ns)) {
1024 $ns = $this->getNamespaceFromPrefix($ns);
1025 $this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns");
1030 $this->debug("in parametersMatchWrapped: No namespace for type $type");
1036 if (!$typeDef = $this->getTypeDef($uqType, $ns)) {
1037 $this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type.");
1040 $this->debug("in parametersMatchWrapped: found typeDef=");
1041 $this->appendDebug($this->varDump($typeDef));
1042 if (substr($uqType, -1) == '^') {
1043 $uqType = substr($uqType, 0, -1);
1047 …$this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $…
1051 $this->debug("in parametersMatchWrapped: not a struct");
1060 …if ($this->isArraySimpleOrStruct($parameters) == 'arraySimple' && count($parameters) == count($typ…
1061 …$this->debug("in parametersMatchWrapped: (wrapped return value kludge) correct number of elements …
1066 $this->debug("in parametersMatchWrapped: change parameter $element to name $name");
1071 $this->debug("in parametersMatchWrapped: have parameter named $name");
1074 $this->debug("in parametersMatchWrapped: do not have parameter named $name");
1079 …$this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped paramete…
1088 $this->debug("in parametersMatchWrapped: no elements type $ns:$uqType");
1097 * - multi-ref serialization
1098 * - validate PHP values against type definitions, return errors if invalid
1108 …$this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVers…
1109 $this->appendDebug('parameters=' . $this->varDump($parameters));
1112 $this->debug('The value of the \$direction argument needs to be either "input" or "output"');
1113 $this->setError('The value of the \$direction argument needs to be either "input" or "output"');
1116 if (!$opData = $this->getOperationData($operation, $bindingType)) {
1117 …$this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bin…
1118 …$this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $…
1121 $this->debug('in serializeRPCParameters: opData:');
1122 $this->appendDebug($this->varDump($opData));
1138 $this->debug("have $part_count part(s) to serialize using $style/$use");
1140 $parametersArrayType = $this->isArraySimpleOrStruct($parameters);
1142 … $this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize");
1143 // check for Microsoft-style wrapped parameters
1145 $this->debug('check whether the caller has wrapped the parameters');
1147 $this->debug('check whether caller\'s parameters match the wrapped ones');
1148 if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) {
1149 $this->debug('wrap the parameters for the caller');
1156 $this->debug("serializing part $name of type $type");
1168 $this->debug('calling serializeType w/indexed param');
1169 $xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
1171 $this->debug('calling serializeType w/named param');
1172 $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
1175 $this->debug('calling serializeType w/null param');
1176 $xml .= $this->serializeType($name, $type, null, $use, $enc_style);
1180 $this->debug('no parameters passed.');
1183 $this->debug("serializeRPCParameters returning: $xml");
1191 * - multi-ref serialization
1192 * - validate PHP values against type definitions, return errors if invalid
1203 …$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion…
1204 $this->appendDebug('parameters=' . $this->varDump($parameters));
1207 $this->debug('The value of the \$direction argument needs to be either "input" or "output"');
1208 $this->setError('The value of the \$direction argument needs to be either "input" or "output"');
1211 if (!$opData = $this->getOperationData($operation)) {
1212 $this->debug('Unable to retrieve WSDL data for operation: ' . $operation);
1213 $this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
1216 $this->debug('opData:');
1217 $this->appendDebug($this->varDump($opData));
1231 $this->debug("use=$use");
1232 $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)');
1234 $parametersArrayType = $this->isArraySimpleOrStruct($parameters);
1235 $this->debug('have ' . $parametersArrayType . ' parameters');
1237 $this->debug('serializing part "'.$name.'" of type "'.$type.'"');
1249 $this->debug('calling serializeType w/indexed param');
1250 $xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
1252 $this->debug('calling serializeType w/named param');
1253 $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
1256 $this->debug('calling serializeType w/null param');
1257 $xml .= $this->serializeType($name, $type, null, $use, $enc_style);
1261 $this->debug('no parameters passed.');
1264 $this->debug("serializeParameters returning: $xml");
1282 …$this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, un…
1283 $this->appendDebug("value=" . $this->varDump($value));
1285 $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"';
1290 if ($value->type_ns) {
1291 $type = $value->type_ns . ':' . $value->type;
1293 $this->debug("in serializeType: soapval overrides type to $type");
1294 } elseif ($value->type) {
1295 $type = $value->type;
1297 $this->debug("in serializeType: soapval overrides type to $type");
1300 $this->debug("in serializeType: soapval does not override type");
1302 $attrs = $value->attributes;
1303 $value = $value->value;
1304 $this->debug("in serializeType: soapval overrides value to $value");
1312 $this->debug("in serializeType: soapval provides attributes");
1322 $this->debug("in serializeType: got a prefixed type: $uqType, $ns");
1323 if ($this->getNamespaceFromPrefix($ns)) {
1324 $ns = $this->getNamespaceFromPrefix($ns);
1325 $this->debug("in serializeType: expanded prefixed type: $uqType, $ns");
1328 if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){
1329 $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type');
1341 …$xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$u…
1343 $this->debug("in serializeType: returning: $xml");
1348 return $this->serialize_val($value, $name, false, false, false, false, $use);
1358 $value = $this->expandEntities($value);
1366 if (!$this->getTypeDef($uqType, $ns)) {
1369 …$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$…
1374 …$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingS…
1376 $this->debug("in serializeType: returning: $xml");
1379 $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)');
1380 } else if ($ns == 'http://xml.apache.org/xml-soap') {
1381 $this->debug('in serializeType: appears to be Apache SOAP type');
1383 $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
1385 $this->debug('in serializeType: Add namespace for Apache SOAP type');
1387 $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap';
1389 $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
1393 $this->debug("serializing map element: key $k, value $v");
1395 $contents .= $this->serialize_val($k,'key',false,false,false,false,$use);
1396 $contents .= $this->serialize_val($v,'value',false,false,false,false,$use);
1408 $this->debug("in serializeType: returning: $xml");
1411 $this->debug('in serializeType: Apache SOAP type, but only support Map');
1416 $this->debug("in serializeType: No namespace for type $type");
1420 if(!$typeDef = $this->getTypeDef($uqType, $ns)){
1421 $this->setError("$type ($uqType) is not a supported type.");
1422 $this->debug("in serializeType: $type ($uqType) is not a supported type.");
1425 $this->debug("in serializeType: found typeDef");
1426 $this->appendDebug('typeDef=' . $this->varDump($typeDef));
1427 if (substr($uqType, -1) == '^') {
1428 $uqType = substr($uqType, 0, -1);
1432 …$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset…
1455 …$xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns)…
1457 $this->debug("in serializeType: returning: $xml");
1464 $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);
1467 …$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . "…
1472 …$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . "…
1475 … $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);
1478 $this->debug("in serializeType: phpType is struct, but value is not an array");
1479 $this->setError("phpType is struct, but value is not an array: see debug output for details");
1498 $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
1500 $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
1502 $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .
1504 $this->getLocalPart($typeDef['arrayType'])."[0]\"/>";
1506 $this->debug("in serializeType: returning: $xml");
1523 $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]");
1525 if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) {
1526 $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
1528 …$contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion…
1542 …$xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/so…
1543 $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/')
1545 .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType']))
1546 .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">"
1562 …$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$…
1567 …$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingS…
1570 $this->debug("in serializeType: returning: $xml");
1587 $this->debug("serialize attributes for XML Schema type $ns:$uqType");
1593 $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType");
1599 $this->debug("value provided for attribute $aName with key $xname");
1602 $this->debug("value provided for attribute $aName with key $xname");
1606 $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName);
1609 $this->debug("no value provided for attribute $aName");
1612 $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\"";
1616 $this->debug("no attributes to serialize for XML Schema type $ns:$uqType");
1619 $ns = $this->getPrefix($typeDef['extensionBase']);
1620 $uqType = $this->getLocalPart($typeDef['extensionBase']);
1621 if ($this->getNamespaceFromPrefix($ns)) {
1622 $ns = $this->getNamespaceFromPrefix($ns);
1624 if ($typeDef = $this->getTypeDef($uqType, $ns)) {
1625 $this->debug("serialize attributes for extension base $ns:$uqType");
1626 $xml .= $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);
1628 $this->debug("extension base $ns:$uqType is not a supported type");
1649 …$this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"…
1655 $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType");
1658 // toggle whether all elements are present - ideally should validate against schema
1666 $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName);
1675 …$this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minO…
1678 …$this->debug("no value provided for complexType element $eName and element is not nillable, so ser…
1691 …unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruc…
1695 // serialize schema-defined type
1696 …$xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $…
1699 $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use");
1700 $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
1705 // serialize schema-defined type
1706 …$xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $…
1709 $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use");
1710 $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
1716 $this->debug("no elements to serialize for XML Schema type $ns:$uqType");
1719 $ns = $this->getPrefix($typeDef['extensionBase']);
1720 $uqType = $this->getLocalPart($typeDef['extensionBase']);
1721 if ($this->getNamespaceFromPrefix($ns)) {
1722 $ns = $this->getNamespaceFromPrefix($ns);
1724 if ($typeDef = $this->getTypeDef($uqType, $ns)) {
1725 $this->debug("serialize elements for extension base $ns:$uqType");
1726 … $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);
1728 $this->debug("extension base $ns:$uqType is not a supported type");
1743 …* @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]…
1755 $k = strpos($k,':') ? $this->expandQname($k) : $k;
1756 $v = strpos($v,':') ? $this->expandQname($v) : $v;
1768 $k = strpos($k,':') ? $this->expandQname($k) : $k;
1769 $v = strpos($v,':') ? $this->expandQname($v) : $v;
1777 …$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrict…
1778 $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType;
1780 …$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'…
1781 …$this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,…
1796 …$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrict…
1798 …$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'…
1799 …$this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumerat…
1810 …$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'…
1811 $this->schemas[$typens][0]->addElement($attrs);
1838 $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements);
1839 $this->addElement(array('name' => $name, 'type' => $name . 'RequestType'));
1846 $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements);
1847 …$this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => …
1852 $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] =
1855 'binding' => $this->serviceName . 'Binding',
1856 'endpoint' => $this->endpoint,
1881 … $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
1883 $this->messages[$name.'Request'][$pName] = $pType;
1886 $this->messages[$name.'Request']= '0';
1893 … $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
1895 $this->messages[$name.'Response'][$pName] = $pType;
1898 $this->messages[$name.'Response']= '0';