// A sample client for the EMBL BioSequence retrieval service // from the EMBL-EBI (http://www.ebi.ac.uk/). This service // will return the EMBL entry of a // given accession number (or identifier) as used by the international // DDBJ/GenBank/EMBL nucleotide sequence databases, e.g. HSERPG, in // either BSML or AGAVE (SCIOBJ) format. // Dependencies: // This class uses the GLUE toolkit from "The Mind Electric" // http://www.themindelectric.com/ Follow the instructions on // installation (add GLUE.jar, servlet.jar and jnet.jar to your // CLASSPATH and update your PATH). // This client uses helper classes generated by the GLUE wsdl2java // tool located in $GLUE_HOME/bin directory. Before compiling and // executing the client, issue the following command (note that you // don't even need to download the WSDL file!): // > wsdl2java http://www.ebi.ac.uk/xembl/XEMBL.wsdl // This will generate new classes: XEMBL.java // & IXEMBL.java. Compile everything, and then run // the client. // Usage: java Client_GLUE ; // E.g. java Client_GLUE BSML HSERPG HSAPX35 // The WSDL file for this service is located at: // http://www.ebi.ac.uk/xembl/XEMBL.wsdl // Contact: Alan Robinson public class Client_GLUE { public static void main( String[] args ) throws Exception { // The accession number or identifier to be looked up in the // EMBL nucleotide sequence database. String format = null; StringBuffer identifiers = null; // Check if sufficient command line arguements have been specified: if (args.length < 2) { System.err.println("Usage: java Client_GLUE "); System.err.println(" format = BSML or SCIOBJ"); System.err.println(" E.g. java Client_GLUE BSML HSERPG HSAPX35"); System.exit(0); } format = args[0]; if ( !format.equalsIgnoreCase("BSML") && !format.equalsIgnoreCase("sciobj") ) { System.err.println("Usage: java Client_GLUE "); System.err.println(" format = BSML or SCIOBJ"); System.err.println(" E.g. java Client_GLUE SCIOBJ HSERPG HSAPX35"); System.exit(0); } // The identifiers need to be in a single comma-delimited string. identifiers = new StringBuffer( args[1] ); for (int i=2; i