HI I have two questions to ask :-
I have a XOM class like this -
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;
}
}
When I deploy this and run the TEST using the "OPENAPI-JSON" REST option , by default I get this input JSON (attached in this message) :-
I dont understant why does the extra "quantity", "price" and "totalAMount" comes ?? In my XOM I have defined "getPOQuanitity", "getPOTotalAMount","getPOPrice" right? So only "poquantity", "poprice", "pototalAmount" should come right? How is this OPENAPI-JSON getting formed? If anyone can help me clarifying this , it will be useful for our testing also.
- ) I have some Print statements in my Rule. When I run this RestAPI Test where can I find the COnsole Print statements? I dont see them in my Server logs.