I'm building a service that aggregates a bunch of data from multiple soap web services. There's a standard on what the web service call and soap package is supposed to look like. But of course, everybody's version is just a little bit different primarily in namespace usage. Is there any why in c# to dynamically fetch a wsdl and create the soap package based on it at runtime? I don't want to have to run the wsdl utility statically for every new service that comes online.
+1
A:
It is possible to do what you are talking about, but it would be very expensive (system resources) and slow. Look into creating a provider based model where you have all your services already referenced and then route the request to the correct service.
The provider model will let you load new providers using reflection just like you are asking.
Here is an example.
http://dotnetslackers.com/articles/designpatterns/HowToWriteAProviderModel.aspx
it can be adapted to services.
Khalid Abuhakmeh
2009-04-09 17:09:22