/hphp/test/zend/bad/ext/soap/tests/bugs/bug50698_3.php
PHP | 13 lines | 13 code | 0 blank | 0 comment | 5 complexity | 9767d1ba64ac1b9174466f37fad33836 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- try {
- new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl');
- echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'";
- } catch (SoapFault $e) {
- if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') {
- echo "ok\n";
- } else {
- echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage.";
- print_r($e);
- }
- }
- ?>