/* * Prerequisite: * 1. Install axis 1.2 or higher version. Please refer to the AXIS documentation * for setup environment variables. * 2. Configure build path to include axis jar files. * * */ import org.apache.axis.client.Call; import org.apache.axis.client.Service; public class EMSearchTestClient { public static void main(String [] args) { String accession_code = "1249"; String authorname = "taylor"; String title = "hiv"; try { String endpoint = "http://emsearch.rutgers.edu/EMSearchWS/services/EMBusinessService"; Service service = new Service(); Call call = (Call) service.createCall(); //*************************************************** // Test method searchContourLevelByAccessionCode //*************************************************** System.out.println(" ** Test method searchContourLevelByAccessionCode **"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName("searchContourLevelByAccessionCode"); String ret = (String) call.invoke(new Object [] { accession_code } ); System.out.println("Got result : \n" + ret); //*************************************************** // Test method searchFittedPDBidByByAccessionCode //*************************************************** System.out.println(" ** Test method searchFittedPDBidByByAccessionCode **"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName("searchFittedPDBidByByAccessionCode"); ret = (String) call.invoke(new Object [] { accession_code } ); System.out.println("Got result : \n" + ret); //*************************************************** // Test method getResultSetXMLByID //*************************************************** System.out.println(" ** Test method getResultSetXMLByID **"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName("getResultSetXMLByID"); ret = (String) call.invoke(new Object [] { accession_code } ); System.out.println("Got result : \n" + ret); //*************************************************** // Test method getResultSetXMLByAuthor //*************************************************** System.out.println(" ** Test method getResultSetXMLByAuthor **"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName("getResultSetXMLByAuthor"); ret = (String) call.invoke(new Object [] { authorname } ); System.out.println("Got result : \n" + ret); //*************************************************** // Test method getResultSetXMLByTitle //*************************************************** System.out.println(" ** Test method getResultSetXMLByTitle **"); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName("getResultSetXMLByTitle"); ret = (String) call.invoke(new Object [] { title } ); System.out.println("Got result : \n" + ret); } catch (Exception e) { System.err.println(e.toString()); } } }