如何在xmlrequest中添加类型列表字段?
例如我有以下课程
public class app{
private java.util.List<java.lang.Integer> test;
private int age;
public int getAge()
{
return this.age;
}
public void setAge(int age)
{
this.age = age;
}
public java.util.List<java.lang.Integer> getTest()
{
return this.test;
}
public void setTest(java.util.List<java.lang.Integer> test)
{
this.test = test;
}
}
以下是xmlrequest格式。
<batch-execution lookup="defaultStatelessKieSession">
<insert>
<com.redhat.loandemo.app>
<age>41</age>
<test></test>
</com.redhat.loandemo.app>
</insert>
<fire-all-rules/>
<get-objects out-identifier="output"/>
</batch-execution>
这里test是整数列表。那么如何将其添加到xmlrequest?
答案 0 :(得分:0)
您的XML请求应为:
<batch-execution lookup="defaultStatelessKieSession">
<insert>
<com.redhat.loandemo.app>
<age>41</age>
<test>1</test>
<test>2</test>
<test>3</test>
<test>4</test>
</com.redhat.loandemo.app>
</insert>
<fire-all-rules/>
<get-objects out-identifier="output"/>