getLocusList
Description: Returns list of loci defined for database.
Arguments
- database (string)
Sample Perl code
#!/usr/bin/perl #Written by Keith Jolley use SOAP::Lite; use strict; use warnings; #####Sample arguments######### my $database = 'neisseria'; ############################## my $soap = SOAP::Lite -> uri('http://pubmlst.org/MLST') -> proxy('http://pubmlst.org/cgi-bin/mlstdbnet/mlstFetch.pl'); my $soapResponse = $soap->getLocusList($database); unless ($soapResponse->fault){ my @loci; for my $locus ($soapResponse->valueof('//locus')) { push @loci, $locus } print "$_\n" foreach (@loci) } 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.ArrayList; public class GetLocusList { public static void main(String[] args) { //Sample arguments////////////////////////////////////////////// String database = "neisseria"; //////////////////////////////////////////////////////////////// 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/", "getLocusList")); ArrayList ret = (ArrayList) call.invoke(new Object[] { database }); for (int i = 0; i < ret.size(); i++) { String locus = (String)ret.get(i); System.out.println(locus); } } catch (Exception e) { System.err.println(e.toString()); } } }
Output
abcZ adk_ aroE fumC gdh_ pdhC pgm_