Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a Web Service via Windows Form

Status
Not open for further replies.

djfrear

Programmer
Jul 11, 2007
83
GB
I have a very simple test web service and wish to call it from a windows form. Now I've read through the MSDN tutorial and find myself getting stuck at actually instantiating the web service.

The MSDN tutorial says to instantiate it by using the following:

servername.Service1 Service = new servername.Service1;

Where servername is the servername on which the service was created and Service1 is the class name.

Now I can't for the life of me get an instance of my service! The only thing I can see in intellisense is the namespace for my service and the methods it's generated after being added as a service reference.

As a note im writing in C# 3.5 using VS 2008 Standard.

Where am I going wrong?

Cheers, Daniel.
 
Found the answer, for some reason it wanted me to create an instance of "Service1SoapClient" rather than just Service1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top