ADanTi wrote:
> I spend some time trying to create my own faults which are subclasses of
> SoapFault. But all the time I get the "uncaught SoapFault exception" and
> "[Client] looks like we got no XML document" messages. Of course I
put the
> <wsdl:fault> element in wsdl description of service so it seems that
there
> is no support for the <wsdl:fault> elements. Is it true?
> Now I wonder if it's possible in php to make you own class extending
> SoapFault which will be handled as SoapFault...
I think it's not possible, since internally it is checked if it's of
type SoapFault. But an other solution is the following (credits to
Dmitry), which will catch any exception and always result a soap fault:
try {
server->handle();
} catch (Exception $e) {
$server->fault("Server", "Uncaught exception", "", $e->__toString());
}
Kind regards,
David
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php