JAVA - SOAP web services

Use the Axis framework to generate the web service client code using the following command line:

java org.apache.axis.wsdl.WSDL2Java ""

For a more detailed introduction into how to develop web services using the RCSB soap interface see the developing web services page.

Then you can run e.g. the code below to execute a BLAST search against PDB:

import; import; import org.pdb.webservices.PdbWebService; import org.pdb.webservices.PdbWebServiceServiceLocator; public class BlastPDB { public static void main(String[] _args) { // call the blast method below using this sequence and the ecutoff value blastThePDB("VLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPL", 10); } private static void blastThePDB(String _sequence, double _eCutOff) { // build the service locator object. This object was created by Axis wsdl2java PdbWebServiceServiceLocator locator = new PdbWebServiceServiceLocator(); try { // construct my URL object String _url = ""; URL url = new URL(_url); // Get the web services interface (axis-generated interface) PdbWebService p = locator.getpdbws(url); // print some feedback to the standard out System.out.println("Blasting... "); // call the blast program on the PDB server using these parameters String output = p.blastPDB(_sequence, _eCutOff, "BLOSUM62" , "HTML"); // print the output System.out.println ( "output : " + output ); // save the output into f file File outputFile = new File ("MyBlastResults.html"); PrintStream printer = new PrintStream ( outputFile ); printer.print(output); printer.flush(); printer.close(); System.out.println("Blast is complete"); } catch (Exception _e) { _e.printStackTrace(); } } }