[MOBY-l] moby questions

Benjamin H Szekely bhszekel at us.ibm.com
Tue Jun 17 17:42:26 UTC 2003


Hey All,
           Thanks Martin.  I actually got everything working by checking 
out the Central Perl modules and running the server myself.  I also found 
a small bugg in the Java code and fixed it.  When a service was retrieved, 
the URL was not being set.  Would you like me to contribute any fixes ? So 
far I find the API very easy to use.  It would be nice however, if there 
were a way to create HAS relationships in addtion to HAS-A.  If there 
already is such functionality, please advise.

 - Ben Szekely
To:     Benjamin H Szekely/Cambridge/IBM at IBMUS
cc:     moby-l at biomoby.org 
Subject:        Re: [MOBY-l] moby questions



> 1) I tried calling a few methods using CentralImpl and I'm getting 
errors.
>
The method 'getServiceNames' works fine - you need just to use the
correct BioMoby server - which is
http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl. This is the
default server in CentralIMPl - but you need to update your CVS copy (I
have changed the server name there about two days ago). If you wish to use
a different (not the default) server you may say so in the CentralImpl
contructor:
Central central = new CentralImpl("http://my.moby.server/");

Regarding the method 'getServiceWSDL', there seems to be a bug in Moby
Central (mark, could you look at it pls?). The bug is that if you ask for
a non-existing service name you get back a strange error (attached below).
But if you ask for an existing service, you really get a WSDL. Try it with
the only service that is current,y register there:
name: getGoTerm, authority: http://www.illuminae.com

So this code was working fine for me:

import org.biomoby.shared.*;
import org.biomoby.client.*;
import java.util.*;

public class Q {
public static void main(String[] args) throws Exception {
Central central = new CentralImpl();
Map map = central.getServiceNames();
Object[] names = map.keySet().toArray();
for (int i=0;i<names.length;i++) {
System.err.println(names[i] + ":" + map.get(names[i]));
}

System.err.println(central.getServiceWSDL("getGoTerm","
http://www.illuminae.com"));
}
}

Regards,
Martin

PS: For Mark - here is the strange error message:

bagheera:~/moby-live/Java> java MobyCmdLineClient -wsdl
Servicetest4,http://mips.gsf.de/MOBY/Central -debug
WSDL for service 'Servicetest4,http://mips.gsf.de/MOBY/Central':
----------------
METHOD CALL: retrieveService
------------
<retrieveService><Service authURI="http://mips.gsf.de/MOBY/Central"
serviceName="Servicetest4"/></retrieveService>

------------

===ERROR===
org.biomoby.shared.MobyException: ===ERROR===
Fault details:
[stackTrace: null]
Fault string: DBD::mysql::db do failed: Column 'contact_email' cannot be
null at MOBY/authority.pm line 96.

Fault code:   {http://schemas.xmlsoap.org/soap/envelope/}Server
Fault actor:  null
When calling:
http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl
===========

at org.biomoby.client.CentralImpl.doCall(CentralImpl.java:158)
at
org.biomoby.client.CentralImpl.getServiceWSDL(CentralImpl.java:683)
at MobyCmdLineClient.main(MobyCmdLineClient.java:171)
===========
bagheera:~/moby-live/Java>



--
Martin Senger

EMBL Outstation - Hinxton                Senger at EBI.ac.uk
European Bioinformatics Institute        Phone: (+44) 1223 494636
Wellcome Trust Genome Campus             (Switchboard:     494444)
Hinxton                                  Fax  : (+44) 1223 494468
Cambridge CB10 1SD
United Kingdom                           http://industry.ebi.ac.uk/~senger



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.open-bio.org/pipermail/moby-l/attachments/20030617/453861ff/attachment-0001.html>


More information about the moby-l mailing list