Dynamic web service in asp.net
-
I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S
-
I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S
Yes, that's possible. All adding a web reference does is creates a "proxy" class that your app uses to call the web service. I don't have the code on me now, but what I did when I had this problem was created the web reference and then modified the proxy class that it created to accept a URL in the constructor. Then, replace the places where it uses the URL you specified in the web reference with this private property. Hope this helps. Let me know if you need more guidance. Michael Flanakin Web Log
-
I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S