Click here to get back home

SOAP::Lite services fault processing

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
SOAP::Lite services fault processing jahhaj 03-07-2007
Posted by jahhaj on March 7, 2007, 12:22 pm
Please log in for more thread options


I've set up a service which deliberately errors. If I access the
service like this

my $res = SOAP::Lite
->uri( ... )
->proxy( ... )
->mol2cxf($mol);
if ($res->fault)
{
print "fault\n";
print "code ", $res->faultcode, "\n";
print "string ", $res->faultstring, "\n";
print "actor ", $res->faultactor, "\n";
}

Then everything works, I see the error message.

But if I try to access through a .wsdl file like this

my $res = SOAP::Lite
->service( ... )
->mol2cxf($mol);
if ($res->fault)
{
}

Then I get a Perl error message 'Can't call method "fault" on an
undefined value ...'

Searching on the internet I've seen a couple of posts which agree this
doesn't work and suggest this instead

my $service = SOAP::Lite->service( ... );
my $res = $service->mol2cxf($mol);
if ($service->call->fault)
{
}

There's even an example in the SOAP::Lite module that does the same
thing. However it doesn't work for me. Turning on trace, it seems that
$service->call->fault makes another call to the service, which then
errors.

I've also tried using on_fault. Again I have the same result,
everything works as expected when I use uri() and proxy() but not when
I use service(). I'm beginning to think that there is no way to get
error information when using service(). Searching the internet I see
I'm not the only person with this problem. Does anyone know how this
is supposed to work?

I should also add then when I'm not causing deliberate errors in my
service, everything works correctly whichever method I'm using to
access my service.

The service was written using GSOAP, I'm only using Perl as the
client. I'm using SOAP::Lite 0.69.

Thanks in advance.


Similar ThreadsPosted
SOAP::Lite : Problem of # sign added by SOAP::Lite in the sent SOAPActionstring November 5, 2004, 8:45 pm
SOAP::Lite WSDL method with multiple soap:body parts February 16, 2005, 3:32 pm
Writing a HTML/ASP SOAP client for a SOAP::Lite destination March 16, 2005, 5:19 pm
Help with SOAP::Lite January 19, 2005, 11:35 pm
SOAP::Lite March 3, 2005, 6:13 am
Using SOAP::Lite and .NET November 16, 2005, 2:12 pm
SOAP::Lite March 5, 2007, 4:26 am
use SOAP::Lite +autodispatch ??? November 23, 2004, 3:12 am
SOAP::Lite weirdness April 6, 2006, 8:07 am
ForkOnAccept for SOAP::Lite TCP server November 27, 2004, 11:32 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap