Re: VS2008 - Calling web service from Windows service

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Maybe as a work-around:

I always use the utility WSDL.exe to generate a class wich can then be used to call the webservice, no need for a web-reference.

Start a command prompt

call vsvars32.bat in \program files\<Your visual Studio version>\Common7\Tools\

call WSDL.exe /l:cs http://localhost/myWebService/Service1.asmx?wsdl (or use /l:vb for vb.net)


Remember to regenerate this class when the webservice changes.


Hope this helps.
Jurjen.



"CSharpner" <csharpner@xxxxxxxxx> wrote in message news:ad1ffb03-3f0e-4f1b-b527-e198741af9c6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What happened to the "Add Web Reference" option in Visual Studio 2008
when right-clicking a Windows Service project? It's in VS2K5, but not
in VS2K8. Anyone know the right way to do this? I need a Windows
Service to call a Web Service.

.