Adding a Web Reference at runtime
I want to call a web service from a Windows Service app, but I want the webreferences to be configurable via a configuration UI. The goal here is to allow the user to configure the webservice calls and to do so without having to add it to the project and recompile. Does anyone know how to do this?
I would greatly appreciate any help, suggestions, or links to samples. I have been digging through search engines the last couple of days with out any luck. I'm hoping someone else may have ran into this before.
When you add a Web reference in Visual Studio, it runs a .NET SDK utility called wsdl.exe to generate a proxy class. You can view this generated code; it's a file named Reference.cs under the Web References subdirectory in your project folder.
I know of no way to generate and compile a Web proxy class at runtime. Instead, you may use the System.Net.WebRequest class to call the Web service directly, without using a proxy class. See http://www.15seconds.com/issue/011204.htm for more information.
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
By Deborah D. Brown in forum .NET
Last Post: 10-27-2002, 09:44 AM
By CodeMage in forum Architecture and Design
Last Post: 09-24-2002, 07:26 AM
By Michael D. Kersey in forum .NET
Last Post: 08-30-2002, 12:05 AM
By ASPSmith Training in forum dotnet.announcements
Last Post: 06-18-2002, 03:39 AM
Last Post: 04-03-2002, 06:41 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL