HighTechTalks DotNet Forums  

VS2008 - Calling web service from Windows service

Dotnet Framework (Webservices) microsoft.public.dotnet.framework.webservices


Discuss VS2008 - Calling web service from Windows service in the Dotnet Framework (Webservices) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
CSharpner
 
Posts: n/a

Default VS2008 - Calling web service from Windows service - 12-31-2007 , 01:37 PM






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.

Reply With Quote
  #2  
Old   
Jurjen de Groot
 
Posts: n/a

Default Re: VS2008 - Calling web service from Windows service - 12-31-2007 , 04:12 PM






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 (AT) gmail (DOT) com> wrote

Quote:
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.


Reply With Quote
  #3  
Old   
CSharpner
 
Posts: n/a

Default Re: VS2008 - Calling web service from Windows service - 12-31-2007 , 05:22 PM



Thanks! Hopefully MS will fix this in a future update.

On Dec 31, 4:12*pm, "Jurjen de Groot" <Jurjen.de.Gr... (AT) xs4all (DOT) nl>
wrote:
Quote:
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:cshttp://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" <csharp... (AT) gmail (DOT) com> wrote in message

news:ad1ffb03-3f0e-4f1b-b527-e198741af9c6 (AT) j20g2000hsi (DOT) googlegroups.com...



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.- Hide quoted text -

- Show quoted text -


Reply With Quote
  #4  
Old   
Spam Catcher
 
Posts: n/a

Default Re: VS2008 - Calling web service from Windows service - 12-31-2007 , 08:21 PM



CSharpner <csharpner (AT) gmail (DOT) com> wrote in news:ad1ffb03-3f0e-4f1b-b527-
e198741af9c6 (AT) j20g2000hsi (DOT) googlegroups.com:

Quote:
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.

Right click and choose "Add Service Reference".

VS.NET 2008 supports WCF which in turns supports web services.

--
spamhoneypot (AT) rogers (DOT) com (Do not e-mail)


Reply With Quote
  #5  
Old   
CSharpner
 
Posts: n/a

Default Re: VS2008 - Calling web service from Windows service - 01-01-2008 , 07:40 PM



On Dec 31 2007, 8:21*pm, Spam Catcher <spamhoney... (AT) rogers (DOT) com> wrote:
Quote:
CSharpner<csharp... (AT) gmail (DOT) com> wrote in news:ad1ffb03-3f0e-4f1b-b527-
e198741af... (AT) j20g2000hsi (DOT) googlegroups.com:

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.

Right click and choose "Add Service Reference".

VS.NET 2008 supports WCF which in turns supports web services.

--
spamhoney... (AT) rogers (DOT) com (Do not e-mail)
Dho! I saw that and for some reason I incorrectly thought it was
adding a *Windows* service reference rather than a *Web* reference.
That is what I needed all along... and even better. Looks like we can
now have our lists as generic lists rather than less capable arrays...
and possibly even reuse types between web services (I think... I'll
have to look into that... if so, that'll solve a LOT of problems).

Thanks!


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.