[Biojava-dev] NCBI SOAP interface

Smithies, Russell Russell.Smithies at agresearch.co.nz
Fri Jul 9 00:41:28 EDT 2004


(I know it's not a BioJava problem but NCBI don't support Java and I
know there's a few SOAP gurus here!!)

Last week, I requested NCBI fix their eutils .wsdl and .xsd so they work
correctly with Axis' wsdl2java utility to convert the WSDL to Java code.
Got an email back on Wednesday saying all done. (I've been getting great
service from NCBI!!!)
Now the src stubs are created correctly and they compile fine but I have
been unable to work out exactly how to get a result set back.
(there is even less documentation for this than BioJava has )

This is what I'm trying: 

        // Make a service
        EUtilsService service = new EUtilsServiceLocator();

        // Now use the service to get a stub to the Service Definition
Interface (SDI)
        EUtilsServiceSoap ncbiSOAP = service.geteUtilsServiceSoap();

        //database name
        String db = "pubmed";

        //Search term
        String term = "cancer";

        //Requests utility to maintain results in user's environment.
Used in conjunction with WebEnv
        String usehistory = "";

        //Value previously returned in XML results from ESearch or
EPost. 
        //This value may change with each utility call. 
        //If WebEnv is used, History search numbers can be included in
an ESummary URL, 
        //e.g., term=cancer+AND+%23X (where %23 replaces # and X is the
History search number).
        String webEnv = "";

        //The value used for a history search number or previously
returned in 
        //XML results from ESearch or EPost.
        String query_key = "";

        //identifies the resource which is using Entrez links (e.g.,
tool=flybase).
        String tool = "";
        String email = "";

        //Use this command to specify a specific search field.
        String field = "";

        //Limit items a number of days immediately preceding today's
date
        int reldate = 60;

        //Limit results bounded by two specific dates. 
        //Both mindate and maxdate are required if date range limits are
applied using these variables
        String mindate = "";
        String maxdate = "";

        //Limit dates to a specific date field based on database
        String datetype = "edat";

        //sequential number of the first record retrieved
        //default=0 which will retrieve the first record)
        int retstart = 0;

        //number of items retrieved
        int retmax = 100;

        String rettype = "";

        //Use in conjunction with Web Environment to display sorted
results in ESummary and EFetch
        String sort = "";

        // fill in values        
        ESearchResult esr = ncbiSOAP.run_eSearch(db, term, usehistory,
webEnv,
                                             query_key, tool, email,
field,
                                             reldate, mindate, maxdate,
                                             datetype, retstart, retmax,
                                             rettype, sort);

        where do I go from here?
        Does anyone have any example code ?


thanx

Russell Smithies

Bioinformatics Software Developer
AgResearch Invermay
Mosgiel
New Zealand



=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the biojava-dev mailing list