[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Dec 14 16:28:33 UTC 2007


gordonp
Fri Dec 14 11:28:33 EST 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv23746/src/main/org/biomoby/client

Modified Files:
	MobyRequest.java 
Log Message:
Added trimming of MOBY payload,for parsing leniency of XML header
moby-live/Java/src/main/org/biomoby/client MobyRequest.java,1.29,1.30
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java	2007/12/07 20:28:31	1.29
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java	2007/12/14 16:28:33	1.30
@@ -590,8 +590,7 @@
 	}
 	try{
 	    node_list = runXPath(responseElementXPath, n);
-	}
-	catch(TransformerException te){	  
+	}catch(TransformerException te){	  
             throw new SOAPException("Cannot select SOAP nodes due to exception "+
 				    "while executing XPath statement:" +te);
 	}
@@ -741,6 +740,9 @@
 	if(localResponseString != null && localResponseString.length() == 0){
 	    throw new MobyException("The MOBY payload has no text contents at all"); 
 	}
+	if(Character.isWhitespace(localResponseString.charAt(0))){
+	    localResponseString = localResponseString.trim();
+	}
 
 	// Check if the payload is an XML document.  If not, try a last ditch effort 
 	// by base64 decoding the contents.  This is technically not allowable in the 




More information about the MOBY-guts mailing list