[MOBY-l] Verifying a Service

Carol Lushbough clushbou at usd.edu
Fri Oct 12 12:52:41 UTC 2007


So sorry to bother you but it is still not clear to me how to best test 
a service in a Java Client.  Given the following statement:

The status of all services is tested hourly, and is recorded in the 
      LSID metadata for each service as a boolean value in the RDF tag
       "isAlive", which may be used by client software to filter-out
       non-functional services.

Is there a Java method that I can call to ask is the service "alive".  
The following code verifies that I can find the service but doesn't 
guarantee that the service is functional.

try {
	Central central = new CentralImpl(url, uri);
 	if (central.findService(s).length > 0)
 		return true;
} catch (MobyException e) {

Am I correct in thinking that once I locate a service, if the following code 
 
String inputXML = "<MOBY><mobyContent></mobyContent></MOBY>";              
String response = new CentralImpl(serviceURL,"http://biomoby.org/").call(serviceName,inputXML );

throws an exception or does not return a response in the form:
     
            <MOBY>
            	<mobyContent></mobyContent>
            </MOBY>

indicates that the service is dead?

Thank you very much!

Carol

-- 
Carol Lushbough
Assistant Professor of Computer Science
University of South Dakota
Vermillion, SD 57069
(605) 677-6138 





More information about the moby-l mailing list