[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Fri Jun 1 13:01:16 UTC 2007


kawas
Fri Jun  1 09:01:15 EDT 2007
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory dev.open-bio.org:/tmp/cvs-serv7954

Modified Files:
	Central.pm 
Log Message:
fixed the embedded cdata bug found by irri
what happened was that in the message child of a registration element, we try to let the user know why the rdf was bad. Unfortunately, it was wrapped in a CDATA element. Now it isnt.
moby-live/Perl/MOBY Central.pm,1.282,1.283
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -r1.282 -r1.283
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/02/20 01:02:01	1.282
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2007/06/01 13:01:15	1.283
@@ -1447,8 +1447,9 @@
 			"Registration successful but RDF is not correctly formatted:\n\n $RDF",
 			$SVC->lsid, "" );
 	}
+	# wrap RDF in CDATA - moved it here, so that we can return the 'bad' rdf above
 	return &_success( "Registration successful", $SVC->lsid,
-		$RDF );
+		"<![CDATA[$RDF]]>" );
 }
 
 sub _getServiceInstanceRDF {
@@ -1467,7 +1468,9 @@
  	my $response = $browser->get($url);
  	if ($response) {
 		my $rdfXML = $response->content;
-		return "<![CDATA[$rdfXML]]>" unless ( $rdfXML =~ /title>Service Instance Not Found</ );
+		# removed cdata element because i want to ensure that we can pass the error in the message.
+		# fixes the embedded CDATA bug found by IRRI
+		return "$rdfXML" unless ( $rdfXML =~ /title>Service Instance Not Found</ );
  	}
  	return "";
 }




More information about the MOBY-guts mailing list