Hi
Using JDEV 12.1.3.0.0 is it possible to send from webservice a List and receive it in the client side?
I wanted just this:
@Stateless
@Path("/costumer")
public class CostumerImpl {
@EJB
SessionEJBnameLocal myBean;
@GET
@Produces(value = { "application/json", "application/xml" })
@Path("/list")
public List<CostumerEO> lista(){
return myBean.getCostumerEOFindAll();
}
}
The only way i found was to create an Object with a List,as showned below, send that Object and this way worked:
@XmlRootElement
public class CustomerList {
List<Customer> customerList = new ArrayList<Customer>();
public void setCustomerList(List<Customer> customerList) {
this.customerList = customerList;
}
@XmlElement(name = "allcustomers")
public List<Customer> getCustomerList() {
return customerList;
}
}
But i would like not to create this object.
Is it possible?
JDev 12.1.3.0.0
Any help would be appreciated.
Regards
Carlos