Removed duplicate code and adjusted captions #249
@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user