Added another constructor to XMLResponseBody

This commit is contained in:
2023-10-26 13:21:20 +02:00
parent 928cd78acd
commit 80ee870976
2 changed files with 9 additions and 5 deletions

View File

@@ -119,11 +119,8 @@ public class XmlController implements RestController {
XPathQueryResult xPathQueryResult =
engine.processXPath(requestBody.getData(), requestBody.getProcess(), requestBody.getVersion());
XMLResponseBody responseBody = new XMLResponseBody(xPathQueryResult.getData().trim(),
"OK", engine.getVersion());
responseBody.setType(xPathQueryResult.getType());
return responseBody;
return new XMLResponseBody(xPathQueryResult.getData().trim(),
"OK", engine.getVersion(), xPathQueryResult.getType());
}
private XMLResponseBody processOther(XmlJob xmlJob) throws Exception {

View File

@@ -22,6 +22,13 @@ public class XMLResponseBody {
this.duration = duration;
}
public XMLResponseBody(String result, String status, String processor, String type) {
this.result = result;
this.status = status;
this.processor = processor;
this.type = type;
}
public String getResult() {
return result;
}