getDatabaseList
Description: Returns list of available databases.
Arguments
- None
Sample Perl code
#!/usr/bin/perl #Written by Keith Jolley use SOAP::Lite; use strict; use warnings; my $soap = SOAP::Lite -> uri('http://pubmlst.org/MLST') -> proxy('http://pubmlst.org/cgi-bin/mlstdbnet/mlstFetch.pl'); my $soapResponse = $soap->getDatabaseList(); unless ($soapResponse->fault){ my @databases; for my $t ($soapResponse->valueof('//database')) { push @databases, $t->{'name'} . ": " . $t->{'description'}; } print "$_\n" foreach (@databases); } else { print join ', ',$soapResponse->faultcode,$soapResponse->faultstring; }
Sample Java code
package org.pubmlst.mlstSOAP; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; import java.util.Vector; public class GetDatabaseList { public static void main(String[] args) { try { String endpoint = "http://pubmlst.org/cgi-bin/mlstdbnet/mlstFetch.pl"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName("http://pubmlst.org/MLST/", "getDatabaseList")); call.setReturnType(org.apache.axis.Constants.SOAP_VECTOR); Vector ret = (Vector) call.invoke(new Object[] { }); for (int i=0; i<ret.size(); i++){ Vector db = (Vector)ret.get(i); System.out.println(db.get(0) + ": " + db.get(1)); } } catch (Exception e) { System.err.println(e.toString()); } } }
Output
bcereus: Bacillus cereus campylobacter: Campylobacter jejuni and Campylobacter coli neisseria: Neisseria spp.