Questions about web services in 2K5

1). Is there anyway to do this in VS 2K5 In 2K3 all we had to do is instanciate a variable of the web service type and edit the "URL" property. Can't seem to find a way to do that in 2K5.

2). Is there an example of exploring the list of available web services from a URL I'd like to be able to have the user enter a URL and then be able to select a web service from the available list.



Answer this question

Questions about web services in 2K5

  • bijie85

    The proxy's Url property is still available in .NET 2.0 and works the same way it did in .NET 1.1. Setting this property will send subsequent requests to the service at the specified URL.
  • Tech Guy

    I'm pretty sure I'm looking for web methods. I have a couple of services/methods that are exposed by the server. The client consumes both of these services/methods. The client needs to be configurable, at run time, which server the services/methods comes from.
    I've found out how to get the current we reference's URL property. I've tried to update the URL but it doesn't seem to change the actual source machine.

  • Jouni79

    1. At it's simplest, it exactly the same in VS2K5 as it was in VS2K3. The dialog box that appears after you add the web reference is a little different (that it, it has more options), but the result is a proxy class that can be instantiated and exposes a Url property.

    2. Do you mean web services or web methods The web methods are available through any WSDL file exposed by the URL. A list of web services is a little more challenging. That is, you could implement a discovery document and use the System.Web.Services.DiscoveryDocument class to iterate across the list. But I never liked exposing a list of the web services. I figured if you didn't know exactly what you were asking for, you shouldn't be bothering me. But that's just me ;)

    Hope that helps.


  • Questions about web services in 2K5