Fixes bug that failed to write error xml for pazpar2 417.
Adds status field to error xml so the ui can do, say,
search.status=='OK' even in case of a search error response.
}\r
} else {\r
errorXml = CommandError.createErrorXml(command.getCommandName(), String.valueOf(handler.getStatusCode()), "Unexpected response type from Service Proxy: "+handler.getContentType(), "Could not process non-XML response from Service Proxy", new String(response,"UTF-8"));\r
- }\r
- commandResponse = new ClientCommandResponse(handler.getStatusCode(),errorXml,handler.getContentType());\r
+ } \r
}\r
+ commandResponse = new ClientCommandResponse(handler.getStatusCode(),errorXml,handler.getContentType());\r
} \r
} catch (Exception e) {\r
e.printStackTrace();\r
errorXml.append("<" + commandName + ">"+nl);\r
errorXml.append(" <applicationerror>"+nl);\r
errorXml.append(" <commandname>" + commandName + "</commandname>"+nl);\r
+ errorXml.append(" <status>FAIL</status>"+nl);\r
errorXml.append(" <statuscode>" + statusCode + "</statuscode>"+nl);\r
errorXml.append(" <exception>" + (exception != null ? XmlUtils.escape(exception) : "") + "</exception>"+nl); \r
errorXml.append(" <errormessage>" + (errorMessage != null ? XmlUtils.escape(errorMessage) : "") + "</errormessage>"+nl);\r
public String getStatus() {\r
return getOneElementValue("status");\r
}\r
- \r
+ \r
public boolean isNew () {\r
return isNew; \r
}\r