Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3646 - branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls

Subject: perfsonar development work

List archive

perfsonar: r3646 - branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3646 - branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls
  • Date: Thu, 10 Apr 2008 10:56:10 -0400

Author: michael.bischoff
Date: 2008-04-10 10:56:10 -0400 (Thu, 10 Apr 2008)
New Revision: 3646

Modified:

branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/ServiceQuery.java
Log:
Fix for retrieving more then one result when doing a lookup for a Service
from an ls.

Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/ServiceQuery.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/ServiceQuery.java
2008-04-10 09:42:56 UTC (rev 3645)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls/ServiceQuery.java
2008-04-10 14:56:10 UTC (rev 3646)
@@ -42,7 +42,7 @@
//TODO if text.equals("") -> no results.
Document xpathResult;
try {
- xpathResult = XMLUtils.getDocumentBuilder().parse(new
InputSource(new StringReader(text)));
+ xpathResult = XMLUtils.getDocumentBuilder().parse(new
InputSource(new StringReader("<services>"+text+"</services>")));
} catch (Exception e) {
throw new UnmarshalException("Couldn't create dom
from xpath result");
}
@@ -51,8 +51,8 @@

private Collection<Service> unMarshallServices(Document xpathResult)
throws UnmarshalException {
Collection<Service> services = new ArrayList<Service>();
-
- NodeList childern = xpathResult.getChildNodes();
+
+ NodeList childern =
xpathResult.getDocumentElement().getChildNodes();
for (int i = 0; i < childern.getLength(); i++) {
Node child = childern.item(i);
services.add(unMarshallService(child));




  • perfsonar: r3646 - branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ls, svnlog, 04/10/2008

Archive powered by MHonArc 2.6.16.

Top of Page