We help IT Professionals succeed at work.

call webservice from C# windows application

Tom Knowlton
Tom Knowlton asked
on
I am not sure how to call a webservice from a C# wiindows applicaiton.

After creating a web reference to the service....I see the following in the code completion:

 ws
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015
Commented:
Is there a class in that list which contains "Client" somewhere in its name? That would be the class you use to actually "call" the webservice--those other classes embody the parameters and response objects for your webservice.
Tom KnowltonWeb developer

Author

Commented:
Yeah...

CampusWebstoreWebService.WebGlobalMethodsSoapClient wbmsc = new CampusWebstoreWebService.WebGlobalMethodsSoapClient();

bool isavail = wbmsc..NameIsAvailable("max");

I think I have it figured-out now....I just needed the SoapClient var.
Tom KnowltonWeb developer

Author

Commented:
thx
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
NP. Glad to help  = )

Explore More ContentExplore courses, solutions, and other research materials related to this topic.