Exemple #1
0
        public GetPersonResponse GetPerson(GetPersonRequest getRequest)
        {
            _log.Debug("InvokePersonManagementService.GetPerson() starting ...");
            PersonManagementClient client   = null;
            GetPersonResponse      response = null;

            try
            {
                client = new PersonManagementClient();
                _log.Debug("client created successfully");
                IPersonManagement pm = (IPersonManagement)client;
                response = pm.GetPerson(getRequest);
                _log.Debug("response was received from ODS PersonManagement service");
            }
            catch (TimeoutException timeout)
            {
                _log.Error("InvokePersonManagementService.GetPerson() Timeout Exception:" + timeout.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (CommunicationException comm)
            {
                _log.Error("InvokePersonManagementService.GetPerson() Communication Exception:" + comm.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (Exception e)
            {
                _log.Error("InvokePersonManagementService.GetPerson() Exception:" + e.Message);
            }
            finally
            {
                if (client != null && client.State != CommunicationState.Closed)
                {
                    ProxyHelper.CloseChannel(client);
                }
            }

            _log.Debug("InvokePersonManagementService.GetPerson() ending ...");
            return(response);
        }
 public async Task <Person> Get(string id)
 {
     return(await _repo.GetPerson(id));
 }