Exemple #1
0
        public Guid?[] GetPersonUuidArray(string[] cprNumberArray)
        {
            BasicOpClient client = CreateClient();
            string        aux    = null;
            var           ret    = client.GetObjectIDsFromCprArray(Context, cprNumberArray, ref aux);

            return(ret);
        }
Exemple #2
0
        public Guid?GetPersonUuid(string cprNumber)
        {
            BasicOpClient client = CreateClient();
            string        aux    = null;
            var           ret    = client.GetObjectIDFromCpr(Context, cprNumber, ref aux);

            return(ret);
        }
Exemple #3
0
 public bool IsAlive()
 {
     try
     {
         BasicOpClient client = CreateClient();
         string        aux    = null;
         var           res    = client.Probe(Context, ref aux);
         return(true);;
     }
     catch (Exception ex)
     {
         Engine.Local.Admin.LogException(ex);
         return(false);
     }
 }
Exemple #4
0
        static void Main(string[] args)
        {
            int[] counts = new int[] { 500, 600, 700, 800, 850, 851 };
            foreach (var count in counts)
            {
                Console.WriteLine(string.Format("Attempting with count = {0}", count));
                SqlDataAdapter adpt = new SqlDataAdapter(
                    string.Format("select top {0} cprNo from T_PM_CPR", count),
                    "");

                DataTable table = new DataTable();
                int       found = adpt.Fill(table);
                Console.WriteLine(string.Format("Found = {0}", found));
                DataRow[] rows = new DataRow[found];
                table.Rows.CopyTo(rows, 0);
                string[] cprNumbers = (from DataRow dr in rows
                                       select dr["cprNo"].ToString()).ToArray();


                WSHttpBinding binding = new WSHttpBinding();
                string        SpnName = "syddjurs.dk";
                string        Address = "http://personmaster-service/PersonmasterServiceLibrary.BasicOp.svc";

                var             identity        = new SpnEndpointIdentity(SpnName);
                EndpointAddress endPointAddress = new EndpointAddress(new Uri(Address + "/PersonMasterService12"), identity);
                BasicOpClient   client          = new BasicOpClient(binding, endPointAddress);

                string aux = "";
                try
                {
                    client.GetObjectIDsFromCprArray("", cprNumbers, ref aux);
                    Console.WriteLine("Succeeded !!");
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    Console.WriteLine(string.Format("Aux={0}", aux));
                }
            }
        }
Exemple #5
0
        static void Main(string[] args)
        {
            int[] counts = new int[] { 500, 600, 700, 800, 850, 851};
            foreach (var count in counts)
            {
                Console.WriteLine(string.Format("Attempting with count = {0}", count));
                SqlDataAdapter adpt = new SqlDataAdapter(
                    string.Format("select top {0} cprNo from T_PM_CPR", count),
                    "");

                DataTable table = new DataTable();
                int found = adpt.Fill(table);
                Console.WriteLine(string.Format("Found = {0}", found));
                DataRow[] rows = new DataRow[found];
                table.Rows.CopyTo(rows, 0);
                string[] cprNumbers = (from DataRow dr in rows
                                       select dr["cprNo"].ToString()).ToArray();

                WSHttpBinding binding = new WSHttpBinding();
                string SpnName = "syddjurs.dk";
                string Address = "http://personmaster-service/PersonmasterServiceLibrary.BasicOp.svc";

                var identity = new SpnEndpointIdentity(SpnName);
                EndpointAddress endPointAddress = new EndpointAddress(new Uri(Address + "/PersonMasterService12"), identity);
                BasicOpClient client = new BasicOpClient(binding, endPointAddress);

                string aux = "";
                try
                {
                    client.GetObjectIDsFromCprArray("", cprNumbers, ref aux);
                    Console.WriteLine("Succeeded !!");
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    Console.WriteLine(string.Format("Aux={0}", aux));
                }
            }
        }