Reputation: 2339
I need to return a collection to calling client from REST webservice,
I did a wrapper something like below,
**
**
public Collection<FundBalanceSetProperties> getVal() {
return ListN;
}
public void setVal(Collection<FundBalanceSetProperties> list) {
// TODO Auto-generated method stub
this.ListN = list;
}
I tried to get the value set as below,
**
**
@GET
@Produces({ MediaType.TEXT_XML })
public Todo getHTML() throws Exception {
Todo todo = new Todo();
Collection<FundBalanceSetProperties> list = myDal.getFundBalanceSet(null, null,
null, null, null, null);
todo.setVal(list);
return todo;
}
But I am getting error
"Exception in thread "main"
com.sun.jersey.api.client.UniformInterfaceException:"
Can someone please help me with returning collection to calling client?
Upvotes: 1
Views: 2242
Reputation: 3053
The two easy options you have are:
Upvotes: 1