Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r3488 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web

Subject: perfsonar development work

List archive

perfsonar: r3488 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r3488 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web
  • Date: Mon, 10 Mar 2008 09:43:03 -0400

Author: mac
Date: 2008-03-10 09:43:02 -0400 (Mon, 10 Mar 2008)
New Revision: 3488

Modified:

trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
Log:
Error Response type implementation - in fact just a small fix. New release of
psBase will be provided soon

Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
2008-03-06 17:05:48 UTC (rev 3487)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web/RequestHandler.java
2008-03-10 13:43:02 UTC (rev 3488)
@@ -59,19 +59,33 @@
*/
public Document acceptCall(Document request) {
try {
+
+ //main code block
+
+ //init if not initialized
if(!initialised) init();
+
+ //check whether two required components are working
+ //- logger and config
checkAuxiliaryComponents();
- return handleCall(request);
+
+ //run handleCall on request
+ return handleCall(request);
+
} catch (PerfSONARException pex) {
- /* If any error occured response with result/error code */
- //create common result code
+ //If any error occured response with result/error code
+
+ //create common result code with ErrorResponse
Message responseMessage =
ResultCodesUtil.createResultCodeMetadata(null, pex);
+ responseMessage.setType("ErrorResponse");
+
//convert it into Document
Document responseDocument = null;
try {
responseDocument =
XMLUtils.convertMessageToDOM(responseMessage);
} catch (PerfSONARException e) {
- //or send null if impossible
+ //Critical error, cannot convert message to DOM;
+ // - parsing error of Error Response, shouldn't happen
logger.fatal(
"RequestHandler: Return null response - can
neither create " +
"response message nor error code message!"



  • perfsonar: r3488 - trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/web, svnlog, 03/10/2008

Archive powered by MHonArc 2.6.16.

Top of Page