Ask a Question related to ASP.NET Web Services, Design and Development.
-
TC #1
Programmatically add / remove web reference in C#
Hello All,
I have winforms app that accesses a webservice and the WSDL is referenced
dynamically.
I was wondering 2 things:
First, if one parses the .config file and changes the URL pointing to the
WSDL, I take it that these changes would not take effect until the user
closes and restarts the app, correct?
The above said, is there a way to programmtically upload the newly parsed
..config file, or, better yet, is there a way to programmatically remove the
old reference and add a new reference pointing to the new WSDL?
Thanks & Regards,
TC
TC Guest
-
#25419 [NEW]: Call-time pass-by-reference has been deprecated but without it it's impossible to pass a object-reference via call_user_function
From: roland at inkoeln dot com Operating system: Linux PHP version: 4.3.3 PHP Bug Type: Variables related Bug description: ... -
Returning a reference to an existing C++ object as a reference
Hi All, Given: package x; sub new { return bless {}, $_; } #-- callback() is call by the C++ class (reader_as_cpp_object) #-- whenever... -
object reference-error with programmatically loading user control
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the... -
how to remove a programe from the add/remove list manually
i am using winXP home, i just remove a programe from the start menu(start>>all programes>>name of the programe>>uninstall),but the programe name is... -
Cannot remove old server reference in Offline Files
Ok, here's the issue: Using group policy to redirect users My Doc's to their user directory on the server. After rebuilding that server to... -
Keenan Newton #2
Re: Programmatically add / remove web reference in C#
Well I am assuming your trying to change the URL where your web service
is found at runtime. This is very easy to do by changing the URL
property on the generated web service proxy.
However, if your intent is to generate a new web service proxy on the
fly from a wsdl file. Then you would have to create your very own class
generator to interupt the wsdl, and generate a class file, compile that
file, and use refelction to call it up. To say the least not an easy
task.
Keenan Newton Guest
-
TC #3
Re: Programmatically add / remove web reference in C#
Hey Guys,
Yep. I now see the 'URL' property of the proxy object.
Thanks a bunch! It's exactly what I was looking for.
Regards,
TC
"Keenan Newton" <kameleon_dj@yahoo.com> wrote in message
news:1114265300.547149.294150@l41g2000cwc.googlegr oups.com...> Well I am assuming your trying to change the URL where your web service
> is found at runtime. This is very easy to do by changing the URL
> property on the generated web service proxy.
>
> However, if your intent is to generate a new web service proxy on the
> fly from a wsdl file. Then you would have to create your very own class
> generator to interupt the wsdl, and generate a class file, compile that
> file, and use refelction to call it up. To say the least not an easy
> task.
>
TC Guest
-
MjSh #4
Re: Programmatically add / remove web reference in C#
your web service class must be like this:
public class sample: System.Web.Services.Protocols.SoapHttpClientProtoc ol
{
[WebMethod]
public string Hello()
{
return "Hi";
}
}
and then add refrence in your project.when you want call method change url:
sample s=new sample();
s.Url = "http://host/sample.asmx";
Response.Write(s.Hello());MjSh Guest



Reply With Quote

