I have a few versions of a WCF web service(being developed by a 3rd party) that I need to support using a single application, depending on the parameters passed into it.
I have read that I must add a service reference to my project in order to use the WCF service.
Does this mean that I must add a service reference for each different version of the web service I am supporting (and by extension, each new version of the web service as it comes out as well)?
Some have suggested that you could simply change the endpoint for the service. Would this allow me to reference any newly added functions, or only the ones included in the service reference I initially imported?
Or is there a way to dynamically create and use a service reference at runtime (which means I could simply create a service reference based on a uri)? If so, how would Visual Studio know which web service functions were valid at compile time?
You can create a dynamic WCF proxy at runtime:
http://www.codeproject.com/Tips/138388/Dynamic-Generation-of-Client-Proxy-at-Runtime-in
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.