Added another constructor to XMLResponseBody
This commit is contained in:
@@ -119,11 +119,8 @@ public class XmlController implements RestController {
|
|||||||
XPathQueryResult xPathQueryResult =
|
XPathQueryResult xPathQueryResult =
|
||||||
engine.processXPath(requestBody.getData(), requestBody.getProcess(), requestBody.getVersion());
|
engine.processXPath(requestBody.getData(), requestBody.getProcess(), requestBody.getVersion());
|
||||||
|
|
||||||
XMLResponseBody responseBody = new XMLResponseBody(xPathQueryResult.getData().trim(),
|
return new XMLResponseBody(xPathQueryResult.getData().trim(),
|
||||||
"OK", engine.getVersion());
|
"OK", engine.getVersion(), xPathQueryResult.getType());
|
||||||
responseBody.setType(xPathQueryResult.getType());
|
|
||||||
|
|
||||||
return responseBody;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private XMLResponseBody processOther(XmlJob xmlJob) throws Exception {
|
private XMLResponseBody processOther(XmlJob xmlJob) throws Exception {
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ public class XMLResponseBody {
|
|||||||
this.duration = duration;
|
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() {
|
public String getResult() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user