On 6 Dec 2001, Edd Dumbill wrote:
> On Wed, 2001-12-05 at 14:07, Dave Belfer-Shevett wrote:
> > here's where it gets tricky.  We know we got an xmlrpc message -back-, but
> > did the call succeed or not?  What I've been doing is
> >
> > if ($r->faultCode()) {
> >     echo "Dude, we're hosed: " . $r->faultString();
> > }
> because xmlrpc_decode only works on the value.
> the faultCode is part of the response, not the return value
>
> use the orginal method to detect the fault

Erm, that's the problem.  $r->faultCode() is not returning 'true', ergo I
can't tell if the call succeeded or not.

In the error I reported (nosuchMethod), I -should- be able to do what I
say above, and flag into my error routing.  But that is returning 'false',
eg, no error.

I can't seem to determine whether a nosuchMethod error occurred or not.

Am i doing something insanely stupid with my PHP code?

Here's more information...

http://www.homeport.org/~shevett/error.phps

is the routine I'm using.

IF
        the xmlrpc server isn't running
THEN
        'send failed to xmlrpc server' is shown

IF
        the call to the rpc server worked, but generated an error
THEN
        the second method does not trigger

So... when is $r->faultCode() used?  The error generated by the xmlrpc
server is a standard 'no such method' response.

What gives?


------------------.--------.
Dave Belfer-Shevett\ KB1FWR \
www.homeport.org    >--------`------------------------------------
[EMAIL PROTECTED]  /  How much deeper would the ocean be without  \
------------------<                   sponges.                     |
                   \______________________________________________/


--
For information about how to subscribe and unsubscribe from this list
visit http://xmlrpc.usefulinc.com/list.html

Reply via email to