Changeset 3569 for trunk/gsdl3/src/java
- Timestamp:
- 2002-11-26T13:58:26+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java
r3512 r3569 205 205 206 206 // for now, just process each request one by one, and append the results to mainResult 207 for (int i=0; i<requests.getLength(); i++) { 207 // Note: if you add an element to another node in the same document, it 208 // gets removed from where it was. This changes the node list - you cant iterate over the node list in a normal manner if you are moving elements out of it 209 int num_requests = requests.getLength(); 210 for (int i=0; i< num_requests; i++) { 208 211 Node result=null; 209 Element req = (Element)requests.item( i);212 Element req = (Element)requests.item(0); 210 213 String path = req.getAttribute(GSXML.TO_ATT); // returns "" if no att of this name 211 214 if (path.equals("")) { … … 224 227 // append the contents of the message to the mainResult - there will only be one response at this stage 225 228 mainResult.appendChild(doc_.importNode(GSXML.getChildByTagName(result, GSXML.RESPONSE_ELEM), true)); 229 } else { 230 System.err.println("MessageRouter Error: request had null result!"); 226 231 } 227 232 } else { 228 System.err.println("MessageRouter : request has illegal module name in:\n"+converter_.getString(req));233 System.err.println("MessageRouter Error: request has illegal module name in:\n"+converter_.getString(req)); 229 234 } 230 235 } 231 236 232 237 } // for each request 233 System.out.println("MR returning result");234 System.out.println(converter_.getString(mainResult));235 238 236 239 return mainResult;
Note:
See TracChangeset
for help on using the changeset viewer.