Tut_02_List.java
import SoaG.*;
import SoaG.AdabasEmployeesMiniServiceStub.*;
/*
* The SOA Gateway LIST method will return all data matching the
* criteria at once, no matter how large the result set is.
*
* So if you need (or want) to retrieve the result set in "chunks"
* of records, or your request requires complex search syntax,
* use the SELECT method.
*
* Tut_03c_SelectConversational.java provides an example for this.
*/
public class Tut_02_List {
public static void main(String[] args) {
try {
AdabasEmployeesMiniServiceStub stub = new AdabasEmployeesMiniServiceStub();
AdabasEmployeeKeyType keys = new AdabasEmployeeKeyType();
keys.setPersonnel_id("50005*");
AdabasEmployeeListElement listKey = new AdabasEmployeeListElement();
listKey.setAdabasEmployeeListElement(keys);
AdabasEmployeesMiniElement result = null;
result = stub.list(listKey, null, null);
AdabasEmployeesMiniElementType root = result.getAdabasEmployeesMiniElement();
AdabasEmployeesMiniType group = root.getAdabasEmployeesMini();
AdabasEmployeeType elements[] = group.getAdabasEmployee();
System.out.println("Number of record read: " + elements.length);
for (int i = 0; i < elements.length; i++) {
AdabasEmployeeType r = elements[i];
System.out.println("Record [" + i + "]"
+ "Personnel Id=" + r.getPersonnel_id() + ", "
+ "Name=" + r.getName() + ", "
+ "First Name=" + r.getFirst_name() + ", "
+ "City=" + r.getCity());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}