Faults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a way to have a SOAP server throw a custom fault? EG: not a SOAP server fault? I know how to define a custom fault in WSDL, but I don't understand how I would cause one to be triggered.

For instance, lets say I have a SOAP service that takes your zip code and returns the temperature at that location.

If someone enters valid data, say 90210 as a zip code, it will return an numeric temperature.

However, maybe the data for 90210 doesn't exist on the server side, and I want to toss a fault (not a server fault, since the server is actually performing correctly, but an application fault). Saying that the data doesn't exist at this time.

Or, lets say the user enters an invalid zip code. I don't want a SOAP server fault, but yet again an application fault.


The only method I've seen server side for throwing is SoapServer->fault(). Is this used for SOAP faults and non-SOAP faults? Are there any examples of usage?


--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux