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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I invoke a web service from a .net windows app?

Status
Not open for further replies.

alexjones

Programmer
Jul 27, 2001
132
US
I have some functionality that is required by a couple of internet sites, an intranet app and a windows app. I would like to provide this functionality as a web service, since most use will be from the web. But I can't move the windows app to the web yet.

So, can this be done? If so, how?

 
Hi,

Yes. You can use a web service in a windows app.

1. Right-click on the windows project
2. Click on Add Web Reference
3. Type in the URL of the web service

This will create a proxy class for you in your project which will handle all communicaiton for you to and from the webservice. If your web service is referenced as
localhost-->MyWebService, the all you have to do is instantiate the service:
[tt]
localhost.MyWebService ws = new localhost.MyWebService();
[/tt]

Easy as 1-2-3.

Cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top