Is that possible in .net to change the target web service at runtime. ie.
change the URL and access a different web service totally. which does totally
different things but has the same Definition.
IE Service1.asmx WEBMETHOD(BYVAL as Integer)
Server2.asmx WEbMETHOD(Byval as integer)
Service3.asmx WEbmethod(byval as integer) and so on....
I know its possible with SOAP TOOLKIT. But i dont want to use that. Is that
possible in VB.net ??
Just to change the URL everytime?
Cheers
C
Yunus Emre ALPÖZEN [MCSD.NET] - 30 May 2005 19:15 GMT
u should write your own service wrapper; which derives
System.Web.Services.Protocols.SoapHttpClientProtocol.. and modify url
property...

Signature
Thanks,
Yunus Emre ALPÖZEN
BSc, MCSD.NET
> Is that possible in .net to change the target web service at runtime. ie.
> change the URL and access a different web service totally. which does
[quoted text clipped - 12 lines]
> Cheers
> C
Chris Hayes - 31 May 2005 03:18 GMT
Sounds too simple, but if you've set the WebService as a Web Reference in
your project and you are instantiating the WebService, there is a URL
property that you can access to either get or set your URL. As long as your
signatures match the WebService you have referenced in your project, it
should be ok. (I tested this out and looks like it works to me).
Dim SomeWebService.Service1 ws As new SomeWebService.Service1()
ws.Url = "http://localhost/SomeWebService/Service3.asmx" (or ws.Url =
SomeStringVariable)
Chris
> Is that possible in .net to change the target web service at runtime. ie.
> change the URL and access a different web service totally. which does
[quoted text clipped - 12 lines]
> Cheers
> C