Reputation: 783
Sorry for the simple question, but is it possible to reference a web service within a Windows application? The only examples I've seen of web services being referenced has been in ASP.NET apps.
I need to access a web service that would provide data from a remote database.
Thanks
Upvotes: 0
Views: 851
Reputation: 70369
Yes - absolutely... you can do that - see for example:
The above links contain detailed explanations and sample source code.
Upvotes: 2
Reputation: 45083
Very definitely yes, and in just the same way you would an ASP.NET web application project from within Visual Studio:
If you're not using Visual Studio (or some other IDE supporting automation of this), and you need to generate the service references manually, you'll want to look into svcutil.
Upvotes: 1
Reputation: 564323
Yes. Just right click on the "References" in the Solution Explorer, and choose Add Service Reference...
. It works the same way in a desktop application.
Upvotes: 3