[MOBY] [MOBY-l] Interpreting results from Service->execute()

Mark Wilkinson markw at illuminae.com
Wed Mar 17 18:46:15 UTC 2004


On Wed, 2004-03-17 at 07:21, Frank Gibbons wrote:

> But shouldn't it be 
> possible, once I know which service I'm interested in, to figure out what 
> input it's looking for? I'm thinking specifically in terms of finding out 
> what are the acceptable namespaces. Of course, I'm sure it is possible 
> (wouldn't it be in the WSDL?) - anyone care to point me to a description of 
> this? :)

The WSDL could (in principle) tell you the service signature in terms of
its structure (XSD) but not its semantics.  For MOBY, the structure is
~irrelevant to us, since the ontology precisely defines the structure
for both input and output.  As such, we haven't even found the need to
implement the creation of an XSD for our objects, hence the somewhat
peculiar WSDL that you get from MOBY Central.

Here's the code that does what you want:

use MOBY::Client::Central;

$m = MOBY::Client::Central->new;
($ss, $r) = $m->findService(authURI => $auth, serviceName => $name);
$service = shift @{$ss};
print "Service $name from $auth is of type ".($service-type)."\n";
print "It consumes: \n";
$inputs = $service->input;
foreach $in (@{$inputs}){
        print "\t",$in->objectType,"\n";
        print "\tin namespace(s)\n";
        my $namespaces = $in->namespaces;
        foreach $ns(@{$namespaces}){
                        print "\t\t$ns\n";
        }
}

print "It generates: \n";
$outputs = $service->output;
foreach $out (@{$outputs}){
        print "\t",$out->objectType,"\n";
        print "\tin namespace(s)\n";
        my $namespaces = $out->namespaces;
        foreach $ns(@{$namespaces}){
                print "\t\t$ns\n";
        }
}


> Should there be a 
> meta-service, that rates the other services in terms of reliability, 
> percentage time that it's up, length of service, or other criteria?

We are discussing this up here in Canuk-land, but it isn't that easy -
see below.

>  I'm not 
> imagining that it would "Service A is much better than Service B", merely 
> that "Service C was last reported working successfully on January 19, 
> 2002." or "Service D has responded to 97% of all requests in the last 
> week." Maybe there is something like this already?

It is surprisingly hard to do this, since the registry does not have any
role in your transaction with the service itself - it is merely a
broker.  On the other hand, we can "watch" peoples behaviour as they use
the registry, and make statements like "9 out of 10 bioinformaticians
who made this type of query chose this service provider".  The problem
of keeping services functional, or reporting on their functionality is
something that I don't think we can address (any more than Google can
address the problem of links being outdated or down at the moment you
click them on the Google site).

M

-- 
Mark Wilkinson (mwilkinson at mrl.ubc.ca)
University of British Columbia iCAPTURE Centre



More information about the moby-l mailing list