[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu Aug 6 14:36:32 UTC 2009


gordonp
Thu Aug  6 10:36:32 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services
In directory dev.open-bio.org:/tmp/cvs-serv27313/src/main/ca/ucalgary/services

Modified Files:
	SoapServlet.java 
Log Message:
Fixed null pointer on initial GET when no data recorder was provided
moby-live/Java/src/main/ca/ucalgary/services SoapServlet.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java	2009/06/09 19:44:34	1.1
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/SoapServlet.java	2009/08/06 14:36:32	1.2
@@ -102,7 +102,7 @@
 		      HttpServletResponse response)
 	throws ServletException, java.io.IOException{
 
-	if(request.getSession(false) == null){
+	if(request.getSession(false) == null && recorder != null){
 	    recorder.startRecording(request); //should set up a session
 	}
 
@@ -447,7 +447,7 @@
 	}
 
 	try{
-	    out.write("<html><head><title>Moby Service Definition Error</title></head>\n".getBytes());
+	    out.write("<html><head><title>Service Definition Error</title></head>\n".getBytes());
 	    out.write(("<body>"+answer+"</body></html>").getBytes());
 	}
 	catch(java.io.IOException ioe){
@@ -906,9 +906,9 @@
 					    restrictions = element.getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema",
 											  "extension");
 					    if(restrictions.getLength() == 0){
-						out.print("Error: Could not find the restriction or extension " +
-							  "attribute for a simple type " +
-							  " schema element " + elementName);
+						//out.print("Error: Could not find the restriction or extension " +
+						//	  "attribute for a simple type " +
+						//	  " schema element " + elementName);
 					    }
 					}
 					else{
@@ -1034,6 +1034,9 @@
 					    dataType.getLocalPart();
 					Map<String,QName> subpartsMap = element2Members.get(dataType);
 					if(subpartsMap == null){
+					    if(dataType.getNamespaceURI().equals("http://schemas.xmlsoap.org/soap/encoding/")){
+						writeDataType(out, part.getKey(), part.getValue(), element2Members, "");
+					    }
 					    out.print("Error: cannot find definition for data type " + 
 						      dataType); //"\nValid types are:");
 					    // for(QName key: element2Members.keySet()){
@@ -1202,7 +1205,8 @@
 	    dataType = new QName(dataType.getNamespaceURI(), datatype);
 	}
 	
-	if("http://www.w3.org/2001/XMLSchema".equals(dataType.getNamespaceURI())){
+	if("http://www.w3.org/2001/XMLSchema".equals(dataType.getNamespaceURI()) ||
+	   "http://schemas.xmlsoap.org/soap/encoding/".equals(dataType.getNamespaceURI())){
 	    if(!isArray){
 		if(memberName.equals(ARRAY_TYPE_SENTINEL)){
 		    memberName = ""; // composite is an array, ignore the sentinel name




More information about the MOBY-guts mailing list