[MOBY-l] Re: revised service output...need some explanations though...

Mark Wilkinson mwilkinson at mrl.ubc.ca
Fri Mar 26 15:51:31 UTC 2004


On Thu, 2004-03-25 at 06:54, Michael Jensen wrote:

> <?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='not_provided'>
>          <Collection>
>              <Scored_string namespace="" id="">
>                      <String namespace="" id="" 
> articleName="acronym">MAPK</String>
>                      <Object namespace="Global_keyword" 
> id="mitogen-activated protein kinase" articleName="string_component"/>
>                      <Long namespace="" id="" 
> articleName="score">0.90884572798250385</Long>
>              </Scored_string>

The structure is not quite correct - it should be 
<Collection>
	<Simple>
		<Scored_string>
	</Simple>
	<Simple>
		<Scored_string>
	</Simple>
	...
</Collection>



> still. What do I need to put in for the Scored_string namespace 
> attribute?
> <Scored_string  namespace="$inputNS" id="$inputID">
> Does that mean the user will be sending a namespace and I just pass 
> that through? And if there is none then I leave it blank? Same 
> questions with the id attribute.

That's correct, unless you actually have pre-defined identifiers for the
object you are passing back (which may be true in your case, or at
least, for some of your sub-objects).   e.g. if you have "MAPK" as an
entity in your own database, and it has an ID number in your database,
then you should probably register your own namespace and then send it
back as:

  <Scored_string namespace="$inputNS" id="$inputNS">                    
	<String namespace="$myNS" id="$myID"
                     articleName="acronym">MAPK</String>
	<Object namespace="Global_keyword" 
                id="mitogen-activated protein kinase" 
                articleName="string_component"/>
          <Long namespace="" id="" articleName="score">
                   0.90884572798250385</Long>
  </Scored_string>

This makes it possible to discover other services in your database
using the <String> component of this message, based on the fact that you
would likely register services that consume objects in the $myNS
namespace.

> From what I know, Global_keyword 
> is designed to be only ONE word, so is there something else like 
> Global_text or do I have to make that or what?

I am really in two minds about this.  Global_keyword is one of the most
confusing objects we have!  Certainly my intention when I made it was
that it would contain only one "meaningful" thing, i.e. that it would
not contain a comma-delimited list of keywords, or keywords joined by
boolean operators... but i didn't really intend it to be
one-word-only... in fact, I have several services that return
Global_keyword objects with more than one word (e.g. when I am returning
taxa names from a Genbank parse).  If you think it is more meaningful to
have two objects - Global_keyword, and Global_keyphrase - then please
feel free to register the latter, and I will tighten up the definition
of the former (though of course, we can't enforce this anyway...)


> My third question is with this new Scored_string thing. Is it an 
> object? I'm a little confused about that, but I think once I know what 
> it is I can figure out how to register it.

Yes, it is a new object.


>  Do I have to do anything 
> different because it is part of a collection or no?

Not during registration of the object itself.  You are only concerned
about collections when you come to register your service.

> (Mark, my email box was full I think so your email kept bouncing back. 
> It is empty now. :)

Okay, let's cross our fingers that this gets through!

M

-- 
Mark Wilkinson (mwilkinson at mrl.ubc.ca)
University of British Columbia iCAPTURE Centre
-- 
Mark Wilkinson, 
Assistant Professor (Bioinformatics)
Dept. of Medical Genetics, 
University of British Columbia
James Hogg iCAPTURE Centre for Cardiovascular and Pulmonary Research
166 - 1081 Burrard St.
Vancouver, BC, Canada, V6Z 1Y6

tel: (604) 682 2344 ext. 62129
fax: (604) 806 9274
 
------------------------------------------------------------------------
It just goes to show you that SOAP::Lite is more intuitive than 
you might think, if you know enough Perl and have the patience 
to dive into the source code.
                -Byrne Reese
                -http://builder.com.com/5100-6389_14-1045078-2.html
------------------------------------------------------------------------



More information about the moby-l mailing list