1 7 8 package test.wsdl.ram; 9 10 public class RamSoapBindingImpl implements Ram{ 11 public Response[] validate(RamData[] in0) throws java.rmi.RemoteException { 12 java.util.Date inDate = in0[0].getCreditCard().getExpires(); 13 java.util.Date now = new java.util.Date (); 14 if (!inDate.before(now)) { 15 throw new java.rmi.RemoteException ("Time check failed. Expires date = " + inDate + ", current time = " + now); 16 } 17 Response[] response = new Response[1]; 18 response[0] = new Response(); 19 response[0].setAccountingDate(new java.util.Date ()); 20 response[0].setAuthorization("AUTH"); 21 response[0].setHostResponseCode("HRC"); 22 response[0].setHostResponseMessage("HRM"); 23 response[0].setProtoBaseResponseCode("PBRC"); 24 response[0].setProtoBaseResponseMessage("PBRM"); 25 response[0].setReasonCode("REASON"); 26 response[0].setReturnCode("RETURN"); 27 response[0].setSalePostingReferenceText("SPRT"); 28 response[0].setTransactionReferenceNumber("TRN"); 29 return response; 30 } 31 } 32 | Popular Tags |