Exemplo n.º 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         cmbMessageCnt.Items.Clear();
         rsx = svc.getEntityXMLKeys(textBox2.Text.Trim(), textBox3.Text.Trim());
         if (textBox2.TextLength > 0 && textBox3.TextLength > 0)
         {
             if (rsx.Length > 0)
             {
                 int i = 0;
                 foreach (var s in rsx)
                 {
                     cmbMessageCnt.Items.Add(i);
                     i++;
                 }
                 textBox4.Text = rsx.Length.ToString();
                 cmbMessageCnt.SelectedIndex = 0;
                 bLoading = false;
             }
         }
     }
     catch (CommunicationException ex)
     {
         ShowMessage(ex);
     }
     catch (Exception ex)
     {
         ShowMessage(ex);
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            BasicHttpBinding binding = new BasicHttpBinding();
            EndpointAddress  add     = new EndpointAddress("http://localhost:8085/Coalesce.DataService/CoalesceDataService");

            CoalesceDataServiceClient svc = new CoalesceDataServiceClient(binding, add);
            //Console.WriteLine(svc.("765997c2-f47d-476a-aca9-03a579d7a063"));

            string p1 = "Fire team";
            string p2 = "Echelon";

            string[] rpn = svc.getEntityXMLKeys(p1, p2);
            Console.Write("Retrieving Object Keys for {0} and {1}\n", p1, p2);
            foreach (string ss in rpn)
            {
                Console.WriteLine(ss);
            }
            Console.Read();
            Console.Read();


            /*******************************************************************************************************************************
             * This does return multiple results, like getEntityXmlByIdType() does but I am exceeding the message size.
             * temporary fix is to return the first hit.
             ********************************************************************************************************************************/

            string p3  = "trexunit";
            string vpn = svc.getEntityXMLByName(p3, p1, p2);

            Console.Write("Retrieving Entity XML for {0}, {1} and {2}\n", p3, p1, p2);
            Console.WriteLine(vpn);
            Console.Read();

            Console.WriteLine(svc.getFieldValue("0c250715-cfea-43f5-926e-7f001ade8bfb"));

            var p = new jEntity();

            try
            {
                //p = svc.getXPath("559f0031-6e7d-438f-a8c8-009c947b7326", "entity", "", "");
            }
            catch (CommunicationException ex)
            {
                Console.WriteLine(ex.Message);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.WriteLine("bub");
        }