I'm attempting to code the method below. The code accesses a program call bean to a COBOL program on the iseries. From what I can see, the COBOL program is accessed correctly yet nothing is returned to the method below (I have verified this by stepping thru debug).
All of the other methods I've done were returning an array of data. This is the only one I've had to do so far that is returning a single record.
Can anyone help figure out what I'm doing wrong or what I might be missing?
And Happy New Year!
public static Credentials verifyCredentials(String VSnumber,
String emailaddress, String password) {
WEBCREDEN cr = new WEBCREDEN();
cr.getREQUEST_LIST().setREQ_VSNO(VSnumber);
cr.getREQUEST_LIST().setREQ_EML(emailaddress);
cr.getREQUEST_LIST().setREQ_PWD(password);
cr.invoke();
Credentials o = new Credentials();
o.setVSnumber(cr.getRESPONSE_LIST().getRSP_VSNO());
o.setEmail(cr.getRESPONSE_LIST().getRSP_EML());
o.setSessionID(cr.getRESPONSE_LIST().getRSP_SESSION());
o.setStatus(cr.getRESPONSE_LIST().getRSP_STATUS());
o.setLastname(cr.getRESPONSE_LIST().getRSP_LSTNM());
o.setFirstname(cr.getRESPONSE_LIST().getRSP_FRTNM());
o.setTitle(cr.getRESPONSE_LIST().getRSP_TITLE()); o.setCountry(cr.getRESPONSE_LIST().getRSP_CNTRY());
o.setPostalcode(cr.getRESPONSE_LIST().getRSP_POSTAL()); o.setPhonenumber(cr.getRESPONSE_LIST().getRSP_PHONE());
o.setType(cr.getRESPONSE_LIST().getRSP_TYPE());
System.out.println("Returned: " + o.getEmail());
return null;
}