public PNR_Reply PNR_Retrieve(SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction, string controlNumber)
        {
            BeforeRequest(transactionStatusCode, linkAction);
            Session session = hSession.Session;
            TransactionFlowLinkType link = hLink.Link;

            var pnrRequest = MessageFactory.buildAvailabilityRequest(controlNumber);

            try
            {
                PNR_Reply reply = client.PNR_Retrieve(ref session, ref link, hSecurity.getHostedUser(), pnrRequest.PNR_Retrieve);
                hSession.Session = session;
                hLink.Link = link;
                AfterReply(transactionStatusCode, linkAction);
                return reply;
            }
            catch (Exception ex)
            {
                var orgEx = ex;
                hSession.Session = session;
                hLink.Link = link;
                throw orgEx;
            }

        }
 public ServiceHandler(String wsap, String endpointConfigurationName)
 {
     client = new AmadeusWebServicesPTClient(endpointConfigurationName);
     hSecurity = new SecurityHandler(client);
     hSession = new SessionHandler(client, hSecurity);
     hLink = new TransactionFlowLinkHandler(client);
     hAddressing = new AddressingHandler(client, wsap);
 }
 public Security_SignOutReply security_SignOut(SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction)
 {
     BeforeRequest(transactionStatusCode, linkAction);
     Session session = hSession.Session;
     TransactionFlowLinkType link = hLink.Link;
     Security_SignOutReply reply = client.Security_SignOut(ref session, ref link, hSecurity.getHostedUser(), MessageFactory.buildSignOutRequest());
     hSession.Session = session;
     hLink.Link = link;
     return reply;
 }
        public Queue_ListReplyQueueViewItem[] GetReservations(string officeId, string queueNumber, SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction)
        {
            BeforeRequest(transactionStatusCode, linkAction);
            Session session = hSession.Session;
            TransactionFlowLinkType link = hLink.Link;

            var queueListRequest = MessageFactory.buildQueueListRequest(officeId, queueNumber);
            var reply = client.Queue_List(ref session, ref link, hSecurity.getHostedUser(), queueListRequest.Queue_List);

            hSession.Session = session;
            hLink.Link = link;
            AfterReply(transactionStatusCode, linkAction);

            return (reply.queueView == null) ? null : reply.queueView.item;
        }
 private void AfterReply(SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction) 
 {
     hSession.AfterReply(transactionStatusCode);
     hLink.AfterReply(linkAction);
 }
 private void BeforeRequest(SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction)
 {
     hSession.handleSession(transactionStatusCode);
     hLink.handleLinkAction(linkAction);
     hAddressing.update();
 }
 public PNR_Reply PNR_Retrieve(SessionHandler.TransactionStatusCode transactionStatusCode, TransactionFlowLinkHandler.TransactionFlowLinkAction linkAction)
 {
     throw new NotImplementedException();
 }