@@ 1328-1337 (lines=10) @@ | ||
1325 | } |
|
1326 | ||
1327 | // Parse the XML file. |
|
1328 | if (!xml_parse($this->parser, $xml, true)) { |
|
1329 | // Display an error message. |
|
1330 | $errstr = sprintf('XML error parsing XML schema on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser))); |
|
1331 | $this->debug($errstr); |
|
1332 | $this->debug("XML payload:\n" . $xml); |
|
1333 | $this->setError($errstr); |
|
1334 | } |
|
1335 | ||
1336 | xml_parser_free($this->parser); |
|
1337 | } else { |
|
1338 | $this->debug('no xml passed to parseString()!!'); |
|
1339 | $this->setError('no xml passed to parseString()!!'); |
|
1340 | } |
|
@@ 5177-5190 (lines=14) @@ | ||
5174 | xml_set_element_handler($this->parser, 'start_element', 'end_element'); |
|
5175 | xml_set_character_data_handler($this->parser, 'character_data'); |
|
5176 | // Parse the XML file. |
|
5177 | if (!xml_parse($this->parser, $wsdl_string, true)) { |
|
5178 | // Display an error message. |
|
5179 | $errstr = sprintf('XML error parsing WSDL from %s on line %d: %s', $wsdl, xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser))); |
|
5180 | $this->debug($errstr); |
|
5181 | $this->debug("XML payload:\n" . $wsdl_string); |
|
5182 | $this->setError($errstr); |
|
5183 | ||
5184 | return false; |
|
5185 | } |
|
5186 | // free the parser |
|
5187 | xml_parser_free($this->parser); |
|
5188 | $this->debug('Parsing WSDL done'); |
|
5189 | // catch wsdl parse errors |
|
5190 | if ($this->getError()) { |
|
5191 | return false; |
|
5192 | } |
|
5193 |