Exemple #1
0
        /// <summary>
        /// Checks whether a connection can be made to the PID/CPR web service by means of calling
        /// the test method on the web service
        /// </summary>
        /// <returns><code>true</code> if a connection can be made</returns>
        public static bool MakeTestConnectionToPidcprService(string pidWsUrl)
        {
            var serviceProviderClient = new PidService(pidWsUrl);

            serviceProviderClient.Test();
            return(true);
        }
Exemple #2
0
        public void TestPid1()
        {
            BootStrapper.Boot();
            PidService            pidService = ObjectFactory.GetInstance <PidService>();
            RequestSplitPnrInfo   request    = new RequestSplitPnrInfo();
            List <SplitPassenger> plist      = new List <SplitPassenger>();

            request.SplitPasList    = plist;
            request.BusinessmanCode = "003";
            request.Office          = "ctu186";
            request.Pnr             = "HYCE5L";

            plist.Add(new SplitPassenger()
            {
                PassengerName = "王雪梅"
            });
            //plist.Add(new SplitPassenger()
            //{
            //    PassengerName = "王华"
            //});

            ResposeSplitPnrInfo response = pidService.SplitPnr(request);
        }
Exemple #3
0
        protected void validatePid(object sender, EventArgs e)
        {
            Session.Remove("CPRMATCH");
            Session.Remove("Text");
            Session.Remove("errorText");
            try
            {
                var cpr = RequestValidator.getValidatedParam("cpr", cprTxt.Text, 20);
                var pid = RequestValidator.getValidatedParam("pid", pidTxt.Text, 40);

                var        wsUrl      = Properties.Get("pid.service.url." + _spidEnv);
                PidService pidservice = new PidService(wsUrl);

                bool cprMatched = pidservice.Match(cpr, pid, SpidPid);
                Session.Add("CPRMATCH", cprMatched);
                if (cprMatched)
                {
                    Session.Add("Text", "Det lykkedes at matche CPR og PID.");
                }
                else
                {
                    Session.Add("errorText", "pid " + pid + " matcher ikke cpr " + cpr);
                }

                pidTxt.Text = HttpUtility.HtmlEncode(pid);
                cprTxt.Text = HttpUtility.HtmlEncode(cpr);
            }
            catch (PidServiceException ex)
            {
                Session.Add("errorText", ex.StatusStringDk);
            }
            catch (ArgumentException ae)
            {
                Session.Add("errorText", ae.Message);
            }
        }
Exemple #4
0
        static void Ping(string serviceUrl)
        {
            var wsClient = new PidService(serviceUrl);

            wsClient.Test();
        }