Exemplo n.º 1
0
        public GetLoanSelfReportedEntryResponse GetSelfReported(GetLoanSelfReportedEntryRequest getRequest)
        {
            GetLoanSelfReportedEntryResponse response = new GetLoanSelfReportedEntryResponse();

            response.LoanCanonical              = new LoanCanonicalType[1];
            response.LoanCanonical[0]           = new LoanCanonicalType();
            response.LoanCanonical[0].LoanTier3 = new LoanTier3Type();
            response.LoanCanonical[0].LoanTier3.LoanSelfReportedEntryArray = new LoanTier3Type.LoanSelfReportedEntryArrayType();

            LoanSelfReportedEntryType sre1 = GetNewLoanSelfReportedEntry(
                "My first loan", "My Loan Holder", "Y", 1, "DF", "SF", 102.00M, new DateTime(2011, 6, 24), 160.56M,
                10001, 1234.11M, "My School", "My Servicer", "www.myservicer.com"
                );
            LoanSelfReportedEntryType sre2 = GetNewLoanSelfReportedEntry(
                "My second loan", "My Loan Holder2", "N", 1, "DF", "SF", 202.20M, new DateTime(2011, 7, 6), 260.56M,
                10001, 1234.22M, "My School", "My Servicer2", "www.myservicer2.com"
                );
            LoanSelfReportedEntryType sre3 = GetNewLoanSelfReportedEntry(
                "My third loan", "My Loan Holder3", "Y", 1, "DF", "SF", 302.33M, new DateTime(2011, 8, 8), 360.56M,
                10001, 1234.33M, "My School", "My Servicer3", "www.myservicer3.com"
                );

            response.LoanCanonical[0].LoanTier3.LoanSelfReportedEntryArray.Add(sre1);
            response.LoanCanonical[0].LoanTier3.LoanSelfReportedEntryArray.Add(sre2);
            response.LoanCanonical[0].LoanTier3.LoanSelfReportedEntryArray.Add(sre3);

            return(response);
        }
Exemplo n.º 2
0
        public GetLoanSelfReportedEntryResponse GetSelfReported(GetLoanSelfReportedEntryRequest getRequest)
        {
            _log.Info("InvokeSelfReportedService.GetSelfReported() starting ...");
            LoanManagementClient             client   = null;
            GetLoanSelfReportedEntryResponse response = null;


            try
            {
                client = new LoanManagementClient();
                ILoanManagement lm = (ILoanManagement)client;
                response = lm.GetLoanSelfReportedEntry(getRequest);
            }
            catch (TimeoutException timeout)
            {
                _log.Error("InvokeSelfReportedService.GetSelfReported() Timeout Exception:" + timeout.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (CommunicationException comm)
            {
                _log.Error("InvokeSelfReportedService.GetSelfReported() Communication Exception:" + comm.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (Exception e)
            {
                _log.Error("InvokeSelfReportedService.GetSelfReported() Exception:" + e.Message);
            }
            finally
            {
                if (client != null && client.State != CommunicationState.Closed)
                {
                    ProxyHelper.CloseChannel(client);
                }
            }


            _log.Info("InvokeSelfReportedService.GetSelfReported() ending ...");
            return(response);
        }