[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu Aug 20 19:52:09 UTC 2009


gordonp
Thu Aug 20 15:52:09 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services
In directory dev.open-bio.org:/tmp/cvs-serv10255/src/main/ca/ucalgary/services

Modified Files:
	SoapServlet.java 
Log Message:
Moved tests from SoapServlet to Test Case class, updated and expanded tests
moby-live/Java/src/main/ca/ucalgary/services SoapServlet.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java	2009/08/20 16:59:36	1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java	2009/08/20 19:52:09	1.5
@@ -3,7 +3,6 @@
 import org.w3c.dom.*;
 
 import ca.ucalgary.services.util.*;
-import org.biomoby.service.test.*;
 
 import javax.servlet.http.*;
 import javax.servlet.ServletException;
@@ -87,7 +86,7 @@
 
 	// See if the user has specified a DataRecorder to be used (customization and/or recording of
 	// user interaction and Web Service response).
-	String dataRecorderClassName = getInitParameter(DATARECORDER_CONTEXTPARAM);
+	String dataRecorderClassName = null;
 	javax.servlet.ServletContext context = getServletContext();
 	if(context != null){
 	    if(context.getInitParameter(DATARECORDER_CONTEXTPARAM) != null){
@@ -1414,73 +1413,6 @@
 	}
     }
 
-    public static void main(String[] args) throws Exception{
-	if(args.length != 1 && args.length != 2){
-	    System.err.println("Usage: java SoapServlet <wsdlURL> [run]\n");
-	    System.exit(0);
-	}
-
-	SoapServlet servlet = new SoapServlet();
-
-	if(args.length == 1){
-	    TestHttpServletRequest request = new TestHttpServletRequest();
-	    TestHttpServletResponse response = new TestHttpServletResponse();
-	    StringBufferServletOutputStream out = new StringBufferServletOutputStream();
-	    request.setParameter(WSDL_HTTP_PARAM, args[0]);
-	    response.setOutputStream(out);
-	    
-	    try{
-		servlet.doGet(request, response);
-	    } catch(Exception e){
-		e.printStackTrace();
-	    } finally{
-		System.out.print(out.getBuffer().toString());
-	    }
-	}
-	else{
-// 	    TestHttpServletRequest request2 = new TestHttpServletRequest();
-// 	    request2.setParameter("wsdl", "http://soap.genome.jp/KEGG.wsdl");
-// 	    request2.setParameter("service", "SOAP/KEGG KEGG SOAP/KEGG KEGGPort " +
-// 				  "SOAP/KEGG get_compounds_by_enzyme SOAP/KEGG#get_compounds_by_enzyme encoded");
-// 	    request2.setParameter("enzyme_id", "ec:1.1.1.1");
-
-// 	    TestHttpServletRequest request2 = new TestHttpServletRequest();
-// 	    request2.setParameter("wsdl", "http://www.ebi.ac.uk/ontology-lookup/OntologyQuery.wsdl");
-// 	    request2.setParameter("service", "http://www.ebi.ac.uk/ontology-lookup/OntologyQuery QueryService " +
-// 				  "http://www.ebi.ac.uk/ontology-lookup/OntologyQuery OntologyQuery " +
-// 				  "http://www.ebi.ac.uk/ontology-lookup/OntologyQuery getTermsByName " +
-// 				  "getTermsByName literal");
-// 	    request2.setParameter("partialName", "seed");
-// 	    request2.setParameter("ontologyName", "GO");
-//  	    request2.setParameter("reverseKeyOrder", "false");
-
-	    TestHttpServletRequest request2 = new TestHttpServletRequest();
- 	    request2.setParameter(WSDL_HTTP_PARAM, "http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl");
-	    request2.setParameter(SERVICE_SPEC_PARAM, "http://www.ncbi.nlm.nih.gov/soap/eutils/ eUtilsService " +
-				  "http://www.ncbi.nlm.nih.gov/soap/eutils/ eUtilsServiceSoap " +
-				  "http://www.ncbi.nlm.nih.gov/soap/eutils/espell eSpellRequest " +
-				  "espell literal");
-	    request2.setParameter("db:opt", "");
-	    request2.setParameter("term:opt", "brest");
-	    request2.setParameter("tool:opt", "");
-	    request2.setParameter("email:opt", "");
-
-	    TestHttpServletResponse response2 = new TestHttpServletResponse();
-	    StringBufferServletOutputStream out2 = new StringBufferServletOutputStream();
-	    response2.setOutputStream(out2);
-	    
-	    try{
-		servlet.doPost(request2, response2);
-	    }
-	    catch(Exception e){
-            e.printStackTrace();
-	    }
-	    finally{
-		System.err.println(out2.getBuffer().toString());
-	    }
-	}
-    }
-
     public static class MyNodeList implements NodeList{
         private Vector<Node> nodes;
         public MyNodeList(){nodes = new Vector<Node>();}




More information about the MOBY-guts mailing list