How To Dynamically Call a Webservice?
-
Is there any way to call a web service without making a web reference in your project or generating proxy classes using wsdl.exe? The project I am working on involves calling a number of web services listed in the appsettings section of the web.config. The app will eventually test these web services for responsiveness. One of the requirements is that it should be configurable from the web.config and should not have to be recompiled upon adding a new web service. I googled a few hours yesterday with little results. Any ideas? Thanks, Scott Stocker
-
Is there any way to call a web service without making a web reference in your project or generating proxy classes using wsdl.exe? The project I am working on involves calling a number of web services listed in the appsettings section of the web.config. The app will eventually test these web services for responsiveness. One of the requirements is that it should be configurable from the web.config and should not have to be recompiled upon adding a new web service. I googled a few hours yesterday with little results. Any ideas? Thanks, Scott Stocker
-
sstocker wrote:
I googled a few hours yesterday with little results
http://en.wikipedia.org/wiki/WSDL[^]
led mike
I know what WSDL is. I am looking for a .NET way to load a web service without a web reference in my project. I know that a WSDL definition will probably be key in accomplishing a dynamic call to a web service but I was unable to find code to accomplish the dynamic call I am looking for.
-
I know what WSDL is. I am looking for a .NET way to load a web service without a web reference in my project. I know that a WSDL definition will probably be key in accomplishing a dynamic call to a web service but I was unable to find code to accomplish the dynamic call I am looking for.
sstocker wrote:
I am looking for a .NET way to load a web service without a web reference in my project.
Well since WSDL provides that capability perhaps you don't know what it is? To use a new web service your configuration information would supply the URL to the WSDL for the new service. Your code would then use the response WSDL to know how to format and where to send a request to the service. Of course the WSDL does not tell where to get the input parameters in your system or even what to do with the response data that might be returned from the web service so I don't really understand the point of all this, but there it is anyway.
led mike