Changing where a webservice's proxy points to...?
-
Hi, I have a wsdl.exe generated proxy called UserService which at the minute talks to www.somewhere.com/someservice, or whatever. I am developing an application (for college) where a company will setup my webservice 'someService' on their server, and an application will talk to that. So obviously someServicewill need: [System.Web.Services.WebServiceBindingAttribute(Name = "someService", Namespace = "http://tempuri.org/")] to be changed to reflect the company's address, etc. There is also a variable 'Url', but that can be easily changed at creation time: public UserService() { this.Url = "http://localhost:3961/S3OnTheGoWebService/S3OnTheGoService.asmx"; } I need to know how to change that WebServiceBindingAttribute at runtime - well, at least whatever it is 'setting', as I would to provide the ability for the user to specify which web service to use when loading up the application. I'm not really sure what WebServiceBindingAttribute is for, or why it is needed. Any help or suggesstions appreciated, Cormac Redmond -- modified at 8:51 Tuesday 10th April, 2007
-
Hi, I have a wsdl.exe generated proxy called UserService which at the minute talks to www.somewhere.com/someservice, or whatever. I am developing an application (for college) where a company will setup my webservice 'someService' on their server, and an application will talk to that. So obviously someServicewill need: [System.Web.Services.WebServiceBindingAttribute(Name = "someService", Namespace = "http://tempuri.org/")] to be changed to reflect the company's address, etc. There is also a variable 'Url', but that can be easily changed at creation time: public UserService() { this.Url = "http://localhost:3961/S3OnTheGoWebService/S3OnTheGoService.asmx"; } I need to know how to change that WebServiceBindingAttribute at runtime - well, at least whatever it is 'setting', as I would to provide the ability for the user to specify which web service to use when loading up the application. I'm not really sure what WebServiceBindingAttribute is for, or why it is needed. Any help or suggesstions appreciated, Cormac Redmond -- modified at 8:51 Tuesday 10th April, 2007
I'm digging around for the same thing, I need to have attributes on the WebServiceBinding object change at runtime.