|
-
Jan 16th, 2007, 04:03 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Help with Web Reference
hi guys! can anybody please help me. I have a Web Reference under my Web References. How can i change the 'Web Reference Url' property of that programmatically? Thanks in advance!
-
Jan 16th, 2007, 04:29 AM
#2
Fanatic Member
Re: Help with Web Reference
Are you talking a web service?
-
Jan 16th, 2007, 12:13 PM
#3
Re: Help with Web Reference
Create an instance of the web service, and set the (if memory serves correctly) Url property.
Alternatively, set the Behavior property to "Dynamic" - a web.config entry will be created with the current URL, and you may change this at will.
http://www.google.co.za/search?q=c%2...ient=firefox-a
-
Jan 17th, 2007, 01:23 AM
#4
Thread Starter
Fanatic Member
Re: Help with Web Reference
Yap! a web referenced to Sharepoint Web Service.
-
Jan 17th, 2007, 04:07 AM
#5
Fanatic Member
Re: Help with Web Reference
I assumed that you already have a wisdil file in your project. In the wisdil file .cs you can make another constructor that accept a string. That string is the new url address. I hope I make myself clear.
-
Mar 10th, 2007, 12:37 AM
#6
Thread Starter
Fanatic Member
Re: Help with Web Reference
I dont have wisdil. How can i have wisdil in my project?
-
Mar 10th, 2007, 12:33 PM
#7
Re: Help with Web Reference
Popskie's referring to the proxy class (i.e. the class you instantiate when you wish to query the web service) generated when you add a web reference - if you show all files within a project, the web reference will have a WSDL file, and a .cs proxy.
Popskie's solution will work, however, if you ever update the web reference, you will have to manually recreate the constructor.
It would be easiest to set the web reference's "Behaviour" property to dynamic; as said before, an appSetting entry will be created in the application's [app/web].config file - this will be loaded when you create an instance of the web service.
Reference material
-
Mar 16th, 2007, 10:21 PM
#8
Thread Starter
Fanatic Member
Re: Help with Web Reference
Ok. Thanks a bunch for the input guys!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|