嗨,我有两个问题要问:-
我有一个像这样的 XOM 课程 -
package com.ibm.p2p;
import javax.xml.bind.annotation.XmlElement;
import ilog.rules.bom.annotations.BusinessName;
import ilog.rules.bom.annotations.CustomProperty;
public class PO {
@XmlElement
private int quantity;
@XmlElement
private double price;
@XmlElement
private double totalAmount;
public PO() {
}
@CustomProperty(name = "dataio.default", value = "true")
public PO(@BusinessName("price") double price, @BusinessName("quantity") int quantity, @BusinessName("totalAmount") int totalAmount) {
this();
this.price = price;
this.quantity = quantity;
this.totalAmount = totalAmount;
}
public int getPOQuantity() {
return quantity;
}
public void setPOQuantity(int quantity) {
this.quantity = quantity;
}
public double getPOPrice() {
return price;
}
public void setPOPrice(double price) {
this.price = price;
}
public double getPOTotalAmount() {
return totalAmount;
}
public void setPOTotalAmount(double totalAmount) {
this.totalAmount = totalAmount;
}
}
当我部署它并使用“OPENAPI-JSON”REST 选项运行测试时,默认情况下我会得到这个输入 JSON(附加在此消息中):-
我不明白为什么会出现额外的“数量”、“价格”和“总金额”?在我的 XOM 中,我定义了“getPOQuanitity”、“getPOTotalAMount”、“getPOPrice”,对吗?所以只有“poquantity”、“poprice”、“pototalAmount”应该来吧?这个 OPENAPI-JSON 是如何形成的?如果有人可以帮助我澄清这一点,它对我们的测试也很有用。
- ) 我的规则中有一些打印语句。当我运行此 RestAPI 测试时,我在哪里可以找到 COnsole Print 语句?我没有在我的服务器日志中看到它们。