Dynamic Web Reference

selden03

New member
Joined
Jun 9, 2004
Messages
1
Programming Experience
10+
Dynamically Changing Web Service

One approach I've taken is to create several web services, all with the same interface and same name (e.g. MyService.Asmx). Then I put them into various pages: http://myserver/web1/MyService.asmx, http://myserver/web2/Service.asxm, etc. The interal process of each web service may be completely different from the others.

Then I create a proxy for one of these using wsdl.exe. I use this proxy in my client program. Then I just change the URL property of the proxy.

In order for this to work, all of the web services must have the exact same API, and same namespace.

Alternatively, you could include proxies for each different web service, but that would be a different approach from this one.

Good luck!
---Selden
 
Top Bottom