downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SoapFault::__construct> <SoapServer::SoapServer
Last updated: Fri, 13 Nov 2009

view this page in

The SoapFault class

Introdução

Represents a SOAP fault.

Sinopse da classe

SoapFault
SoapFault extends Exception {
/* Properties */
/* Methods */
__construct ( string $faultcode , string $faultstring [, string $faultactor [, string $detail [, string $faultname [, string $headerfault ]]]] )
SoapFault ( string $faultcode , string $faultstring [, string $faultactor [, string $detail [, string $faultname [, string $headerfault ]]]] )
public string __toString ( void )
/* Inherited methods */
final public string Exception::getMessage ( void )
final public int Exception::getCode ( void )
final public string Exception::getFile ( void )
final public string Exception::getLine ( void )
final public array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private string Exception::__clone ( void )
}

Propriedades

message

Prop description

code

Prop description

file

Prop description

line

Prop description

Índice



add a note add a note User Contributed Notes
SoapFault
dmitry dot koterov at gmail dot com
29-Oct-2009 10:21
You may use undocumented and invisible property $e->faultcode to access string version of $code. Because standard $e->getCode() does not work:

<?php
$e
= new SoapFault("test", "msg");
var_dump($e->getCode()); // prints "0"
var_dump($e->faultcode); // prints "test"
?>

Also you may use namespaced fault codes:

<?php
$e
= new SoapFault(array("namespace", "test"), "msg");
?>

- see ext/soap/soap.php, PHP_METHOD(SoapFault, SoapFault). To access the namespace, use $e->faultcodens

SoapFault::__construct> <SoapServer::SoapServer
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites