Dear all,

I am trying to access Biomart from a java program using the WSDL at http://www.biomart.org/biomart/martwsdl. I think the query and returned results are OK since using Wireshark I can see both of them with the expected data, however I get an empty List<ResultsRow> in the code as result of the query.

I attach part of the code. Am I missing something??

Thanks in advance,
Gorka

public class Ensembl {
    public Ensembl() throws MalformedURLException {
        //BioMartSoapService service = new BioMartSoapService();
BioMartSoapService service = new BioMartSoapService(new URL("http://www.biomart.org/biomart/martwsdl";), new QName("http://www.biomart.org:80/MartServiceSoap","BioMartSoapService";));
        //mPort = service.getBioMartSoapPort();
mPort = service.getPort(new QName("http://www.biomart.org:80/MartServiceSoap";, "BioMartSoapPort"), MartServiceSoap.class);
    }

List<ResultsRow> query( String dataset, List<Filter> filters, List<Attribute> attrs ) throws BioMartException_Exception {
        Dataset ds = new Dataset();
        ds.setName(dataset);
        if( filters != null )
            ds.getFilter().addAll(filters);
        if( attrs != null )
            ds.getAttribute().addAll(attrs);
        ArrayList<Dataset> list = new ArrayList<Dataset>();
        list.add(ds);
        //return mPort.query("default", 0, -1, 1, list);
        return mPort.query("default", 0, 10, 1, list);
    }

...
_______________________________________________
Users mailing list
[email protected]
https://lists.biomart.org/mailman/listinfo/users

Reply via email to