[MOBY-l] Settingup MOBY Service

Vijay Narayanasamy VNarayan at mail.brc.mcw.edu
Fri Jul 18 20:23:08 UTC 2003


Hi all,

I'm a new to BioMOBY. I tried to register a service that takes an Object
'Global_Keyword' as the input and returns String 'Global_Keyword' as the
output.  I tested my Service (cgi) locally using a perl client and it works
fine.

For example the output is "Welcome to BioMOBY Vijay" for the input "Vijay" 

I registered this service with MOBY. The service got registered but when I
send the Input object to my service. I got "Service Unavailable" message. 

What is the mistake that I'm be doing? 


The following is the source code (If I failed to explain correctly). All the
files are in my cgi-bin directory.

hibye.pl (The client I used to test my service)
-------------------------------------------------------------------

#!/usr/local/bin/perl -w

use SOAP::Lite;

my $name = shift;

print SOAP::Lite

   -> uri('http://prometheus.brc.mcw.edu/Demo')

   -> proxy('http://prometheus.brc.mcw.edu/vnarayan-bin/hibye.cgi')

->welcome($name)

   -> result;



hibye.cgi (The Service)
--------------------------------
#!/usr/local/bin/perl -w

use SOAP::Transport::HTTP;

use Demo;

SOAP::Transport::HTTP::CGI

  -> dispatch_to('Demo')

  -> handle;

 

Demo.pm ( The modules that has the subroutine welcome)
----------------------------------------------------------------------------

#!/usr/local/bin/perl -w

package Demo;

sub welcome{
  shift;                                      # remove class name
  return "Welcome to BioMOBY" ." ". shift;
}
1;


RegisterService.pl (The code that I used to register my service)
---------------------------------------------------------------------------

#!/usr/local/bin/perl -w

use MOBY::Client::Central;

my $C = MOBY::Client::Central->new();

$C->registerService(

    serviceName  => "HiService",  

    serviceType  => "Retrieval",  

    authURI      => "http://prometheus.brc.mcw.edu",      

    contactEmail => 'vnarayan at mail.brc.mcw.edu',      

    description => "Vj's test service that welcomes you to BIOMOBY. Enter
your first name", 

    category  =>  "moby",

    URL    =>  "http://prometheus.brc.mcw.edu/vnarayan-bin/hibye.pl",

            input =>[ ['asdf',[Object => ['Global_Keyword']]],], # Simple

            output =>[['asdfg', [String => ['Global_Keyword']]],], # Simple

            );

exit 0;

Vijay Narayanasamy
Bioinformatics Research Center
Medical College of Wisconsin
8701, W. Watertown Plank Road
Milwaukee, WI 53226



More information about the moby-l mailing list