Web Service
-
Hi All, I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? Even I gone through following article for implementation. http://www.codeproject.com/script/comments/user\_new.asp?forumid=12076&main=/script/comments/forums.asp But when I call method of dynamically changed URL, its raises an exception TimeOut. Thanks & Regards Manoj
-
Hi All, I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? Even I gone through following article for implementation. http://www.codeproject.com/script/comments/user\_new.asp?forumid=12076&main=/script/comments/forums.asp But when I call method of dynamically changed URL, its raises an exception TimeOut. Thanks & Regards Manoj
-
manojk_batra wrote: I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? The proxy class generated at the client has the URL property, doesn't it?
Thanks for the answer, I does not know what is proxy class? how it is generated and used? With Rgards Manoj
-
Thanks for the answer, I does not know what is proxy class? how it is generated and used? With Rgards Manoj
manojk_batra wrote: I does not know what is proxy class? This proxy class is an object which represents the web service at the client side. The client application in fact will invoke the proxy object which in turn dispatches the call to the web service. The proxy object then receives the result from the server side and turns back to the client. For more information on how it works , you can take a look at the model: Anatomy of an XML Web Service Lifetime[^] manojk_batra wrote: how it is generated and used? Basically, there are two ways to generate the proxy class. If you use VS to add reference to the web service (Add Web Reference) and you normally specify the URL to the service, VS will automatically generate the proxy class for you. You will find this class in the Web References folder, in the Reference.cs file. The proxy basically inherits from the SoapHttpClientProtocol base class, and the URL property basically holds the static URL that you specify when adding reference. Another way is to use the Wsdl.exe tool to manually generate the proxy class. For more information, you can see Generating an XML Web Service Proxy[^] As I said earlier, the proxy class inherits the public property URL[^] from the base class, and at runtime before invoking a web method you can dynamically assing a new URL to this property.
-
manojk_batra wrote: I does not know what is proxy class? This proxy class is an object which represents the web service at the client side. The client application in fact will invoke the proxy object which in turn dispatches the call to the web service. The proxy object then receives the result from the server side and turns back to the client. For more information on how it works , you can take a look at the model: Anatomy of an XML Web Service Lifetime[^] manojk_batra wrote: how it is generated and used? Basically, there are two ways to generate the proxy class. If you use VS to add reference to the web service (Add Web Reference) and you normally specify the URL to the service, VS will automatically generate the proxy class for you. You will find this class in the Web References folder, in the Reference.cs file. The proxy basically inherits from the SoapHttpClientProtocol base class, and the URL property basically holds the static URL that you specify when adding reference. Another way is to use the Wsdl.exe tool to manually generate the proxy class. For more information, you can see Generating an XML Web Service Proxy[^] As I said earlier, the proxy class inherits the public property URL[^] from the base class, and at runtime before invoking a web method you can dynamically assing a new URL to this property.
Thanks for HELP. But still I need your Help. Actually I added the Web reference in VS and I got the Reference.cs file. I added the new contructor for a class which is derived from System.Web.Services.Protocols.SoapHttpClientProtocol. thats take the parameter of new URl String in which i modified the URL property as given in following article link http://www.codeproject.com/cs/webservices/CallXMLWebServices.asp With Regards Manoj
-
Thanks for HELP. But still I need your Help. Actually I added the Web reference in VS and I got the Reference.cs file. I added the new contructor for a class which is derived from System.Web.Services.Protocols.SoapHttpClientProtocol. thats take the parameter of new URl String in which i modified the URL property as given in following article link http://www.codeproject.com/cs/webservices/CallXMLWebServices.asp With Regards Manoj