Closed GoogleCodeExporter closed 8 years ago
Currently the function signature is: TSoapServer::fault($title, $details='',
$code='SERVER', $actor='', $name='');
The error code should be passed as the third parameter; thse are in turn passed
to php's SoapServer class: http://it.php.net/manual/en/soapserver.fault.php
(note that parameters are in different order).
Is this eough or am i missing something?
Original comment by ctrlal...@gmail.com
on 5 Feb 2012 at 10:01
according to a comment in
http://php.net/manual/en/soapfault.soapfault.php#84426 the code must conform to
the specification.
I quickly scanned http://www.w3.org/TR/soap12-part1/#faultcodes and thought
that the most appropriate location for the actual error would be the detail
part of a soap fault message, e.g. "<m:MaxTime>P5M</m:MaxTime>"
On the other side, PHP automatically uses "Server" or "Client" as the code,
depending on where the error occured:
Server: e.g. SoapFault sent from the Server
Client: e.g. parse error on the client side because of an invalid XML document.
however, i do not find myself qualified enough to judge the "correct" way :)
thanks,
raoul
Original comment by ra...@bhatia.at
on 7 Feb 2012 at 11:14
Original comment by ctrlal...@gmail.com
on 12 Feb 2012 at 6:17
so, there will be no change then and one should use the code parameter?
Original comment by ra...@bhatia.at
on 13 Feb 2012 at 8:50
I don't fully get your problem. You can use TSoapServer::fault() or directly
throw a SoafFault exception from inside your soap provider's method
implementation.
As you noticed, SoapFault's faultcode is not the right place to pass an
internal database error code or other similar not-soap-fault code: you should
probably use the details part of the soap message for that.
If you have an idea on how to enhance this, i'll be glad to discuss and
implement it.
Original comment by ctrlal...@gmail.com
on 14 Feb 2012 at 9:41
Original issue reported on code.google.com by
ra...@bhatia.at
on 3 Feb 2012 at 4:42