[MOBY] [MOBY-l] Output of a service

Mark Wilkinson markw at illuminae.com
Fri Mar 19 17:20:32 UTC 2004


Could someone out there please forward my response on to Catherine?  I'm
not sure if my own response will get through to her since my SMTP server
has been blacklisted throughout the world :-/  It just bounced back to
me as "rejected".

Thanks!

M

On Fri, 2004-03-19 at 09:11, Mark Wilkinson wrote:
> Hi Catherine!
> 
> Congratulations on your first service :-)
> 
> A few comments, and answers to your questions:
> 
> 
> >     serviceType  => "Analysis",
> 
> please feel free to register a more descriptive service type that
> inherits from "Analysis" - e.g. melting_point_determination ISA Analysis
> 
> ... though if we were to do it right, it should probably have a bit more
> granularity than that... something like:
> 
> Nucleotide_Sequence_Analysis
> DNA_Sequence_Analysis
> Physical   ( Structural...      Chemical...    Functional...)
> Melting_Point
> 
> 
> >   my @simples = MobyXmlObject->getMobySimples($query);
> 
> I see you are using Ken's code to get the Simples.  This is fine, but I
> don't think his code has been updated with the recent API changes that
> require the inputs to be enumerated.  Ken?  Also, Ken, perhaps you could
> migrate these routines into the CommonSubs.pm module (or simply add your
> module in the CVS) to make it easier for all of us to keep the code
> up-to-date with API changes.
> 
> Catherine - you wont *break* anything by being non-compliant in this
> way, since these API changes were all backward-compatible, however you
> wont be 100% compliant... which is a shame for your first service :-)
> 
> >         <text-plain namespace='' id=''>
> >             <![CDATA[$textresult]]>
> >             </text-plain>
> 
> You should probably register an object that inherits from text-formatted
> (rather than text-plain) and give it the name of your analysis program
> e.g. as we have done with NCBI_Blast_Text and NCBI_Blast_XML.
> 
> 
> >     $MOBY_RESPONSE .= simpleResponse($result, '');
> 
> simpleResponse now takes three arguments, the third one being the
> enumerated identity of the query to which you are responding (see
> above).  Again, you wont *break* anything by doing it this way, but...
> 
> 
> >   return responseHeader . $MOBY_RESPONSE . responseFooter;
> 
> responseHeader also takes arguments.  At a minimum, it takes your
> authority, but it can also be used to provide serviceNotes.
> 
> responseHeader('bioweb.pasteur.fr');
> 
> or
> 
> responseHeader(
> 	-authority => 'bioweb.pasteur.fr', 
> 	-note => 'software version xxx');
> 
> something like that...
> 
> > The "debug" step worked ok. Now, it is the ->execute() that returns... nothing.
> 
> Unfortunately, I don't see your service in the registry, so you must
> have it in some private registry?  If I could see it, I could help you
> debug it...
> 
> > the XML description associated to an object is.
> 
> Ken has this tool in his "encyclopedia":
> 
> http://plantsp.sdsc.edu/cgi-bin/MOBY/MOBY_display_object_xml.cgi?obj=PutYourObjectHere
> 
> > 1) Do we have to register a sub-class of text-plain or is it possible de use the 
> > text-plain object type? 
> 
> You can output text-plain if you wish, but it is better "semantically"
> to create a specific object type for a specific data type, as this will
> help people to e.g. create parsers for your output (parsing "plain-text"
> would be meaningless... ;-) )
> 
> > 2) If we have to register a new object type :
> > 	- a) What kind of namespace would you use for such a new object type then? 
> 
> you don't register namespaces together with objects - the two things are
> independent.  What you would do is to take the namespace/id from the
> incoming request object and use that as the namespace/id of your
> outgoing plain-text (or whatever) object.  The way to think of MOBY
> Analysis services is that they take incoming data and output a different
> representation of the same data, hence the output has the same
> namespace/ID as the input (in most cases...)
> 
> 
> > 3) Once you know what type of object you have to return, how do you provide it
> > as a return value of your service? In raw XML?
> 
> Your service code is ~perfect as far as I can see, so I am not sure why
> you are not getting any output from it... Your interpretation of the
> spec seems to be 100% correct!  
> 
> yes, when using the simpleResponse subroutine you do exactly as you say
> - you give it raw XML, and it will build the response for you.
> 
> > I hope these are not too much FAQ, thanks in advance,
> 
> I'm sorry that I wasn't able to solve your exact problem... if you
> register your service in the public registry I will play with it today
> and we should have it fixed up right away!
> 
> Cheers!
> 
> M
-- 
Mark Wilkinson (mwilkinson at mrl.ubc.ca)
University of British Columbia iCAPTURE Centre



More information about the moby-l mailing list