Adding a Web Reference at runtime


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Adding a Web Reference at runtime

  1. #1
    Join Date
    Nov 2003
    Location
    Austin, Texas
    Posts
    59

    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.

    Thanks,
    Jon

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    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.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. adding web reference
    By Deborah D. Brown in forum .NET
    Replies: 1
    Last Post: 10-27-2002, 09:44 AM
  2. [ARTICLE] Building a maintainable web site
    By CodeMage in forum Architecture and Design
    Replies: 0
    Last Post: 09-24-2002, 07:26 AM
  3. Re: Why REST is a better way to do Web Services
    By Michael D. Kersey in forum .NET
    Replies: 2
    Last Post: 08-30-2002, 12:05 AM
  4. Free ASP.NET Web Matrix Design/Editor Tool Released
    By ASPSmith Training in forum dotnet.announcements
    Replies: 0
    Last Post: 06-18-2002, 03:39 AM
  5. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center