I am working on SessionFacade/DTO's. I created a
test client for the Members table and used an iterator to loop through the values. The code is below:
try {
Integer sMemberId = new Integer("1");
Collection c = client.findByDocNames(sMemberId);
Iterator i = c.iterator();
while (i.hasNext()) {
MasterDocCatalogRemote mcr = (MasterDocCatalogRemote)PortableRemoteObject.narrow(i.next(),MasterDocCatalogRemote.class);
System.out.println("DocId = " + mcr.getMasterDocId() + " DocName = " + mcr.getDocName());
}
} catch (Exception ex) {
ex.getStackTrace();
System.out.println("Exception = " + ex);
}
The SessionFacade/DTO's is returning an array of MasterDocCatalogDto[]. I want to be able to loop through and see values. I need an object and class for the narrow parameters and i am not sure what needs to be placed in the object parameter. The code is listed below:
try {
Integer sMemberId = new Integer("1");
int i;
MasterDocCatalogDto[] c = client.masterDocCatalogFindByDocNames(sMemberId);
for (i=1; i lessthan c.length; i++) {
MasterDocCatalogRemote mcr = (MasterDocCatalogRemote)PortableRemoteObject.narrow(???, MasterDocCatalogRemote.class);
System.out.println("DocId = " + mcr.getMasterDocId() + "DocName = " + mcr.getDocName());
}
} catch (Exception ex) {
ex.getStackTrace();
System.out.println("Exception = " + ex);
}
Can someone set me staight???