Multiple web service calls

Topics: General Discussion Forum
Jan 20, 2008 at 5:15 AM
I have a project that requires a web service client app to make calls to the different servers that host the same web service. I am wondering what the best way is to handle the client side code. For example, do I just create multiple WSLDs (via the ASP wsdl cmd) and then just loop through invoking the service via the proxy classes? Or can I some how get around to using just one proxy class? The actual web service is the same on all of the servers, it's just that I need to access it on different servers. So, since it's the same WSDL, is there a way to create a single proxy, that perhaps either has methods or mechanisms to interface to the many servers that the service is installed on.

Jan 21, 2008 at 6:58 PM
You can use a single proxy and have different endpoints defined in your config file with each service URL and then you simply pass the endpoint name to the proxy ctor.