Reputation:
For some reason I can't catch the error. I'm following an example in O'Reillys PHP cookbook, so I'm not doing any cowboy coding (yet).
The error is:
SoapFault exception: [SOAP-ENV:Server] SoapFault::SoapFault() [soapfault.soapfault]: Invalid parameters. Invalid fault code. in C:\xampp\htdocs\soap\client_database.php:13 Stack trace: #0 C:\xampp\htdocs\soap\client_database.php(13): SoapClient->__soapCall('select_query', Array) #1 {main}
Upvotes: 1
Views: 6680
Reputation: 179119
As per the standards there are only 5 possible options for a fault code:
Choose the most appropriate to your situation and use that one as a value for $faultCode when throwing a SoapFault exception.
Upvotes: 1
Reputation:
I found the solution, you can only use certain error codes when throwing an error.
http://www.w3.org/TR/soap12-part1/#faultcodes
Upvotes: 1
Reputation: 29897
I got other (weird) SOAP errors in php 5.2.0 which where resolved in php 5.2.8
If you're not on the latest version of php I suggest upgrading and see what happens
Upvotes: 0