Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have WebService in asp.net,how to add reference in (VB.NET) windows form application.
Posted
Updated 8-Feb-15 20:26pm
v2

1 solution

Hi,

Follow below steps.
1) Create a service (webService/WCF).And copy the Service wsdl URl's similar to "http:-----/Service1.svc?wsdl"
2) Go to your Windows application's Solution Explorer. Right Click on your Project.
3) Select "Add Service Reference".
4) "Add Service Reference" dialogue box opens. Paste the URL of WSDL url you copied from service.
5)Click on "Go" button. You will find all the WebMethods in the service.
6) Rename Servicename in Name space text box to a meaningful service name.
7) Click "OK" button. You are done..!

Now use service name space you entered while adding in your windows application programming.
C#
MyService.Service1Client serv = new MyService.Service1Client();
            string s = serv.GetData(Convert.ToInt32(textBox1.Text));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900