27Re: [soaplite] on_fault
- Feb 13, 2001Hi, Ray!
--- Ray Rizzuto <ray.rizzuto@...> wrote:
> I'd like to be able to handle all errors from a soap call,Here is the reason. faultstring() and other methods are readonly. You
> transport errors, after the call completes. I've set the following
> fault handler, which almost works except that the faultstring isn't
> available after the call to the method:
> sub fault
> my($soap, $res) = @_;
> if (defined $res && ref $res)
> print $res->faultstring;
> return $res;
> print $soap->transport->status;
> $res = new SOAP::SOM;
> $res->faultstring("transport error");
may get access to message structure, but you cannot update/modify it.
Next version probably will generate warning/error if you try to
provide parameter(s) for these methods.
> I'm very new to this, so I may be making an obvious mistake.You may check Error Handling section on http://guide.soaplite.com/. I
prefer 2.k example and in any case you always have access to result
of the call through call() method:
Even if call made with autodispatch:
use SOAP::Lite +autodispatch => ...;
Best wishes, Paul.
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
- << Previous post in topic Next post in topic >>