I am consuming a web service that returns a list of objects, the list contains 10 objects and each object contains 5 attributes nombre
, placa
, sexo
, direccion
, fecha
.
What I need to know is how to reccre the list and access to each attribute of the objects to make a series of comparisons.
Try to do it with a for each
but simply print me the 10 objects, but not the data that each object contains
Also try with an iterator but the same thing happens
Iterator iter = MILISTA.iterator();
while (iter.hasNext())
System.out.println(iter.next());
So I consume the web service and I empty everything to the list List Compare, This list is filled with 10 objects, when I do debug I can see the attributes of the objects, but I do not know how to print them
public void MtdConsultarComparendo(ActionEvent event) {
ServiciosComparendos BBB = ClsSeguridad.ServiciosComparendos();
ViewComparendoWeb XVARIABLEX = new ViewComparendoWeb();
XVARIABLEX.setPLACA(getPlacax());
setListaComparendos(BBB.getcomparendoWeb(XVARIABLEX));
}