Exemplo n.º 1
0
        protected void Application_Start()
        {
            if (!_loggingStarted)
            {
                try
                {
                    log4net.Config.XmlConfigurator.Configure();
                    _log.Info("ASAIDP Application Logger Started - APPLICATION START");
                }
                catch (Exception ex)
                {
                    //There is nothing we can do here, there is no way to log this failue
                    //and we don't want to abort the application just because logging won't load
                    _log.Info("ASAIDP Logging Start Exception => " + ex.ToString());
                }

                _loggingStarted = true;
            }

            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);

            SAMLController.SSOSessionStore = new CookieSSOSession();

            ASBSSOAdapterModule.Init();

            IKernel kernel = ASBSSOAdapterModule.GetKernel();

            kernel.Bind <IDVerifier>().To <ASAIDP.SSO.Plugins.SiteMemberPlugin>().
            Named("ASAIDP.SSO.Plugins.SiteMemberPlugin");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SelfReported"/> class.
        /// </summary>
        public SelfReported()
        {
            Log.Info("ASA.Web.Services.SelfReported.ServiceImplementation.SelfReported() object being created ...");

            //_selfReportedAdapter = new SelfReportedAdapter();
            _memberAdapter = new AsaMemberAdapter();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Will call the Qualtric's Target Audience API createUser.
        /// </summary>
        /// <param name="member">The member.</param>
        /// <returns></returns>
        internal void CreateUserProcess(ASAMemberModel member)
        {
            const string logMethodName = ".CreateUserProcess(ASAMemberModel member) - ";

            Log.Debug(logMethodName + "Begin Method");

            string QTA_Process = Common.Config.QTA_Process;

            if (QTA_Process.ToLower() == "on")
            {
                Log.Info(logMethodName + "Qualtrics TA Process on - request attempt will be made");

                //https://survey.qualtrics.com/WRAPI/Contacts/api.php?Request=createContact&Format=JSON&Version=2.3&User=APIDevelopment&Token=ZyEeqfR9oFI9bTOu1tzWNWQ43my7elCNXBe6Ql8b&LibraryID=GR_6r0To7ELRwsmMfP&ListID=CG_dbUMDRYesJ0MCot&[email protected]&FirstName=Todd&LastName=Leslie&ExternalDataRef=Id12346&ED[Contact]=true&ED[Org0]=Org-99999&ED[Org1]=Org-77777&ED[Org2]=Org-55555&ED[Org3]=Org-33333&ED[Org4]=Org-11111&ED[Org5]=&ED[Org6]=&ED[Org7]=&ED[Org8]=&ED[Org9]=
                String urlToRequest = BuildUrlString("createContact");
                urlToRequest += BuildDataString(member);

                Log.Debug(logMethodName + "Request - " + urlToRequest);

                HttpsRequestProvider httpsRequestProvider = new HttpsRequestProvider();
                string responseString = httpsRequestProvider.sendRequestToQualtricsTA(urlToRequest);
            }
            else
            {
                Log.Info(logMethodName + "Qualtrics TA Process off - request not made");
            }

            Log.Debug(logMethodName + "End Method");
        }
Exemplo n.º 4
0
 public AppTool()
 {
     _log.Info("ASA.Web.Services.AppToolService.ServiceImplementation.AppTool() object being created ...");
     if (Config.Testing)
     {
         _appToolAdapter = new MockAppToolAdapter();
     }
     else
     {
         _appToolAdapter = new AppToolAdapter();
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// Inserts row into the table associated with the
        /// data object that is requested to be updated
        /// </summary>
        /// <param name="obj">Business entity object</param>
        /// <returns>Boolean indicating success or failure</returns>
        public void Add(Object obj)
        {
            ISession session = null;

            session = GetSession();
            Log.InfoFormat("Adding data object of type {0}:", obj.ToString());
            session.Save(obj);
            LogTransactionInfo();
            Log.Info("Save completed");
        }
Exemplo n.º 6
0
        public ResultCodeModel InsertSelfReportedLoans(SelfReportedLoanListModel srLoans)
        {
            ResultCodeModel result = new Common.ResultCodeModel();

            if (srLoans == null)
            {
                _log.Info("Null SelfReportedLoan list object in ASA.Web.Services.SelfReportedService.SelfReportedAdapter.InsertSelfReportedLoans.");
            }
            else
            {
                // INSERT
                //xWebWrapper xWeb = new xWebWrapper();
                //XmlNode node = TranslateSelfReportedModel.MapSelfReportedLoanListToXmlNode(srLoans);
                ////node = xWeb.InsertFacadeObject("ASASelfReportedLoan", node);
                //result = TranslateSelfReportedModel.MapXmlNodeToResultCodeModel(node);
            }

            return(result);
        }
Exemplo n.º 7
0
 /// <summary>
 /// ApplyDispatchBehavior():  This method will be used to add the
 /// ASADispatchMessageInspector behavior to the MessageInspectors collection
 /// of the dispatcher-runtime for all the endpoints of the hosted service.
 /// </summary>
 /// <param name="serviceDescription"></param>
 /// <param name="serviceHostBase"></param>
 public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
 {
     svcDescription = serviceDescription;
     _Log.Info("ApplyDispatchBehavior");
     foreach (ChannelDispatcher channelDispatcher in serviceHostBase.ChannelDispatchers)
     {
         foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
         {
             _Log.InfoFormat("Adding to {0}", endpointDispatcher.EndpointAddress.Uri);
             endpointDispatcher.DispatchRuntime.MessageInspectors.Add(this);
         }
     }
 }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
        public GetAppToolResponse GetAppTool(GetAppToolRequest getRequest)
        {
            _log.Info("InvokeAppToolService.GetAppTool() starting ...");
            AppToolClient      client   = null;
            GetAppToolResponse response = null;

            try
            {
                client = new AppToolClient();
                IAppTool pm = (IAppTool)client;
                response = pm.GetAppTool(getRequest);
            }
            catch (TimeoutException timeout)
            {
                _log.Error("InvokeAppToolService.GetAppTool() Timeout Exception:" + timeout.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (CommunicationException comm)
            {
                _log.Error("InvokeAppToolService.GetAppTool() Communication Exception:" + comm.Message);
                ProxyHelper.HandleServiceException(client);
            }
            catch (Exception e)
            {
                _log.Error("InvokeAppToolService.GetAppTool() Exception:" + e.Message);
            }
            finally
            {
                if (client != null && client.State != CommunicationState.Closed)
                {
                    ProxyHelper.CloseChannel(client);
                }
            }


            _log.Info("InvokeAppToolService.GetAppTool() ending ...");
            return(response);
        }
Exemplo n.º 10
0
        public void ApplyDispatchBehavior(ServiceDescription serviceDescription, System.ServiceModel.ServiceHostBase serviceHostBase)
        {
            _Log.Info("Apply Schema Validation DispatchBehavior");
            foreach (ChannelDispatcher channelDispatcher in serviceHostBase.ChannelDispatchers)
            {
                foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
                {
                    _Log.InfoFormat("Adding to {0}", endpointDispatcher.EndpointAddress.Uri);


                    SchemaValidationMessageInspector svmi = new SchemaValidationMessageInspector(schemaSet, validateRequest, validateReply, false);

                    endpointDispatcher.DispatchRuntime.MessageInspectors.Add(svmi);
                }
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Publish the object.
        /// </summary>
        public override void AfterPropertiesSet()
        {
            ValidateConfiguration();

            asaServiceHost = new ASAServiceHost(TargetName, objectFactory, BaseAddresses);

            asaServiceHost.Open();

            #region Instrumentation

            if (LOG.IsInfoEnabled)
            {
                LOG.Info(String.Format("The service '{0}' is ready and can now be accessed.", TargetName));
            }

            #endregion
        }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Content"/> class.
 /// </summary>
 public Content()
 {
     Log.Info("ASA.Web.Services.ContentService() object being created ...");
     memberAdapter   = new AsaMemberAdapter();
     _contentAdapter = new ContentAdapter();
 }