[MOBY-dev] Debugging MOBY Services

Mark Wilkinson markw at illuminae.com
Sun Jul 13 04:23:43 UTC 2003


If you aren't fully familiar with SOAP::Lite you may find that debugging
your service is a real pain, and it is even worse if you are trying to
debug it by using the CGI client to execute it!  (you shouldn't be doing
that, by the way... it will just give you a headache because it doesn't
pass any error messages back to you...)

Here's the script that I use to watch the service being executed and
look at any error messages that my service is passing back to me:

use MOBY::Client::Central; 
use SOAP::Lite + trace;
use MOBY::Client::Service;

unless (defined $ARGV[0] && defined $ARGV[1]){ die "\a\a\n\nusage:

perl debug_moby_central.pl  MYauthURI  MYserviceName

"}


$m = MOBY::Client::Central->new; 
($sis, $fail) = $m->findService(authURI=>$ARGV[0],
serviceName=>$ARGV[1]);
 
$s = ${$sis}[0];   # has to be the one and only
print $s->name; 
$wsdl = $m->retrieveService($s); 
$S = MOBY::Client::Service->new(service => $wsdl); 
$result = $S->execute(XMLinputlist => [["", ""]]);
print $result;


Cheers all!

Mark

-- 
Mark Wilkinson <markw at illuminae.com>
Illuminae




More information about the MOBY-dev mailing list