示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            System.Net.NetworkCredential cr = new System.Net.NetworkCredential("moviedo", "3");
            System.Net.WebProxy          pr = new System.Net.WebProxy("127.0.1.2", 80);

            gastosWs.SingleService2 svc = new WebService_Secure.gastosWs.SingleService2();
            string list;

            svc.Credentials = cr;
            //svc.Proxy = pr;
            try
            {
                // list = svc.GetServicesList("", false);
                using (gastosWs.SingleService2 wService = new gastosWs.SingleService2())
                {
                    wService.Credentials = cr;
                    wService.Url         = "http://katy.sytes.net/gastosws/SingleService.asmx";
                    list = wService.GetServicesList("", true);
                }
                MessageBox.Show(list);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex));
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            System.Net.NetworkCredential cr = new System.Net.NetworkCredential("moviedo", "3");
            System.Net.WebProxy pr = new System.Net.WebProxy("127.0.1.2", 80);

            gastosWs.SingleService2 svc = new WebService_Secure.gastosWs.SingleService2();
            string list;
            svc.Credentials = cr;
            //svc.Proxy = pr;
            try
            {

                // list = svc.GetServicesList("", false);
                using (gastosWs.SingleService2 wService = new gastosWs.SingleService2())
                {
                    wService.Credentials = cr;
                    wService.Url = "http://katy.sytes.net/gastosws/SingleService.asmx";
                    list = wService.GetServicesList("", true);
                }
                MessageBox.Show(list);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex));
            }
        }