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

Mark Wilkinson markw at illuminae.com
Tue Mar 16 23:21:45 UTC 2004


Hi Frank,

I'm pleased that you have had relatively good luck using MOBY!

w.r.t. your specific question:

On Tue, 2004-03-16 at 15:07, Frank Gibbons wrote:
> Response is:
> 
> <?xml version='1.0' encoding='UTF-8'?>
>        <moby:MOBY xmlns:moby='http://www.biomoby.org/moby'
> xmlns='http://www.biomoby.org/moby'>
>          <moby:Response moby:authority='pdg.cnb.uam.es'>
>          <moby:queryResponse queryID='1'/>
>      </moby:Response>
>        </moby:MOBY>
> 
> Now I'm not XML expert, but it's certainly not gibberish, or an error 
> condition. I'm fairly sure the accession number I'm using is correct (it 
> works when I go to IntAct's webpage): if it's not correct, shouldn't the 
> service let me know somehow ("ID not found"). And if it is correct, where's 
> my information? If the id is correct, but there are in fact no interacting 
> methods, shouldn't it say "There are no interacting methods"? Instead it 
> seems to just be acknowledging my request, but not providing any new 
> information.

The service is, in fact, responding correctly according to the API,
where the following statement appears:

"There are as many queryResponse elements as there were queryInput
elements (if a service cannot respond to a specific query for whatever
reason, this element may be empty!)."

When I designed this aspect of the behaviour, my intention was to avoid
having to enumerate all of the different possible reasons why something
might fail; it was sufficient to simply return an "I don't know" as an
empty node in the XML.  

There is no implication therein that the ID you passed is invalid, nor
anything else... and in fact, for non-authoritative services there is no
way for the service provider to know this in any case!  Saying "ID
unknown" (or whatever) might incorrectly imply that the ID is invalid,
rather than just replying that this *particular* service doesn't know
the answer to your question, thus the behaviour is to simply return you
'null' if the service can't respond.

The client-side paradigm you might want to use is that if you can't get
the result from one service, iterate through the valid services that
provide your desired output until you *do* get a result.  If you don't
get a result from anyone, then you are out of luck, but that still
doesn't imply that the ID number you used is invalid :-)


> But I'm 
> really hoping there's a simpler answer

The simpler answer might be that the service isn't working properly ;-) 
We'll have to ask our Spanish friends to check it... hopefully they are
listening!

good luck!

Mark


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



More information about the moby-l mailing list