Consume Web Service in Windows (WinForms) Application

Last Reply on Jan 06, 2014 05:46 AM By Pradip

Posted on Jan 06, 2014 05:30 AM

I have created web service and also call the method but not getting the output in windows mobile application,

can anyone help me??

here is my code.

 private void button1_Click(object sender, RoutedEventArgs e)
        {

            string uname, pwd;
            uname = textBlock1.Text;
            pwd = textBlock2.Text;
            ServiceReference2.finWebServiceSoapClient sc = new ServiceReference2.finWebServiceSoapClient();
            
            sc.resultAsync(textBlock1.Text, textBlock2.Text);
            sc.resultCompleted += new EventHandler<ServiceReference2.resultCompletedEventArgs>(sc_resultCompleted);
            
            textBlock3.Visibility = Visibility.Visible; 
            
           //  string url = "http://192.168.1.131:8080/Ciright/axis/CommonWS?wsdl";          
           //  HttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create(url);

            //ServiceReference1.CommonWSEndPointClient client = new ServiceReference1.CommonWSEndPointClient();
            //client.m98459Completed += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_completed);
            //client.m98459Async(uname,pwd);
            
        }

        private void sc_resultCompleted(object sender, resultCompletedEventArgs e)
        {
            //listBox1.ItemsSource= e.Result;
            textBlock3.Text = e.Result.ToString();
        }

 

You are viewing reply posted by: Pradip on Jan 06, 2014 05:46 AM.