Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

Change url of web service at runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gujju - 30 May 2005 02:15 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.