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

Ken Steube steube at sdsc.edu
Fri Mar 19 17:30:37 UTC 2004


Catherine, there could be some other reasons why you're getting no
output from the service. Something in the configuration or registration of
the service could be wrong and you might get no error message.

Try these things:

1) Edit the dispatcher CGI and add a line

	die 'xxxxx verifying CGI gets called';

and try to execute the service. Look in the httpd error log file and
see if the xxxxx line is there. If not, then maybe your URL to the
dispatcher is wrong causing the CGI to not be executed.

2) One the dispatcher CGI is being called, try to verify that the
method test_SequenceToFASTA is being called. Put a die line like
the one above in it and again check the httpd log. If the xxxxx line
is not there then the dispatch is failing. Check to make sure you have
the 'use MobyEd_services;' line correct and that the name of the service
is correct.

3) Maybe the file is not being compiled correctly. You might not see any
error message even from failure to compile. At the top of the method
test_SequenceToFasta put a line 'return $query;' to return the input
without modification. Now you should see a return value, but it will
just be the input echoed back. When you get to that point, you know the
reason is later in the script and you can start to narrow it down.

Ken



On Fri, 19 Mar 2004, 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
>
>

-- 
--
--
Ken Steube
San Diego Supercomputer Center
University of California, San Diego, MC 0505
9500 Gilman Drive
San Diego, California, 92093-0505  USA
FAX (858) 822-3610




More information about the moby-l mailing list