Changed process to processorData in app

This commit is contained in:
2023-10-27 10:24:31 +02:00
parent 430b6de5f0
commit 87b9bfafc6
3 changed files with 10 additions and 10 deletions

View File

@@ -117,7 +117,7 @@ public class XmlController implements RestController {
XMLRequestBody requestBody = xmlJob.getRequestBody(); XMLRequestBody requestBody = xmlJob.getRequestBody();
XPathQueryResult xPathQueryResult = XPathQueryResult xPathQueryResult =
engine.processXPath(requestBody.getData(), requestBody.getProcess(), requestBody.getVersion()); engine.processXPath(requestBody.getData(), requestBody.getProcessorData(), requestBody.getVersion());
return new XMLResponseBody(xPathQueryResult.getData().trim(), return new XMLResponseBody(xPathQueryResult.getData().trim(),
"OK", engine.getVersion(), xPathQueryResult.getType()); "OK", engine.getVersion(), xPathQueryResult.getType());
@@ -130,14 +130,14 @@ public class XmlController implements RestController {
String result = null; String result = null;
switch (xmlJob.getXmlJobType()) { switch (xmlJob.getXmlJobType()) {
case XSLT: case XSLT:
result = engine.processXSLT(requestBody.getData(), requestBody.getProcess()); result = engine.processXSLT(requestBody.getData(), requestBody.getProcessorData());
break; break;
case XSD: case XSD:
result = engine.validate(requestBody.getData(), requestBody.getProcess()).trim(); result = engine.validate(requestBody.getData(), requestBody.getProcessorData()).trim();
break; break;
case XQuery: case XQuery:
result = engine.executeXQuery(requestBody.getData(), result = engine.executeXQuery(requestBody.getData(),
requestBody.getProcess(), requestBody.getProcessorData(),
requestBody.getVersion()); requestBody.getVersion());
break; break;
} }

View File

@@ -4,13 +4,13 @@ import com.google.gson.annotations.SerializedName;
/** /**
* POJO class used to contain body of XML related requests * POJO class used to contain body of XML related requests
* @author Adam * @author Adam Bem
*/ */
public class XMLRequestBody { public class XMLRequestBody {
@SerializedName("data") @SerializedName("data")
private String data; private String data;
@SerializedName("process") @SerializedName("processorData")
private String process; private String processorData;
@SerializedName("processor") @SerializedName("processor")
private String processor; private String processor;
@SerializedName("version") @SerializedName("version")
@@ -20,8 +20,8 @@ public class XMLRequestBody {
return data; return data;
} }
public String getProcess() { public String getProcessorData() {
return process; return processorData;
} }
public String getProcessor() { public String getProcessor() {

View File

@@ -100,7 +100,7 @@ function prepareURL(): string {
function prepareRequestBody():string { function prepareRequestBody():string {
var requestBody = JSON.stringify({ var requestBody = JSON.stringify({
"data": props.xml, "data": props.xml,
"process": props.query, "processorData": props.query,
"processor": engine.value, "processor": engine.value,
"version": version.value "version": version.value
}); });