Re: wsdl

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



how can I use wdsl to generate a proxy like this?

Thanks


Jesse Houwing wrote:
Martin Honnen wrote:


yurps wrote:


I have a webservice which I must deploy then generate a proxy
stub and add to my website project and then compile that and
deploy. Thing is I have 3 environments DEV, UAT, and PRO and
I need to rename the class name and constuctor accordingly.

public class Molar :
System.Web.Services.Protocols.SoapHttpClientProtocol {

public Molar() {
this.Url = "http://mysite/MyWebService/Service.asmx";;
}

but I need to change this to:

public class MolarDEV :
System.Web.Services.Protocols.SoapHttpClientProtocol {

public MolarDEV() {
this.Url = "http://mysite/MyWebService/Service.asmx";;
}

Is there a wsdl switch I can use to do this automatically, as the fewer
manual steps
I have in my deployment the better.

Try wsdl.exe /? to find the command line options, as far as I can see
there is none for the class name but you can use/generate different
namespaces using e.g.
wsdl.exe /namespace:DEV


Why would you want to generate a proxy with the url integrated into it.
It's duplicating a lot of classes, for a configuration issue.

Why not use

Molar m = new Molar();
m.Url = "http://mysite.etc/Service.asmx";;

If you want you can event put this url in the app/web.config file for
automatic configuration at runtime.

Jesse

.



Relevant Pages

  • Re: wsdl
    ... Thing is I have 3 environments DEV, UAT, and PRO and ... public Molar() { ... public class MolarDEV: ... If you want you can event put this url in the app/web.config file for automatic configuration at runtime. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Proxy Override
    ... > This is configured under Client Configuration, Web Proxy. ... > override settings in the user's web browser, ... > like to set the browser to use an automatic configuration ...
    (microsoft.public.isa)
  • Re: Proxy Override
    ... > This is configured under Client Configuration, ... We have a need for the ISA proxy for> internet sites, but also a need to access many internal> sites via private circuits. ... Currently we use the Proxy> override settings in the user's web browser, but I would> like to set the browser to use an automatic configuration> script. ...
    (microsoft.public.isa)
  • Re: [fw-wiz] Forcing All Web traffice thew a remote proxy.
    ... Internet firewall, and then use an ... "automatic configuration script" that is on the HTTP proxy. ... Using the auto config script allows us to centrally ... It talks about using Automatic Configuration and Automatic Proxy. ...
    (Firewall-Wizards)
  • Proxy Override
    ... Currently we use the Proxy ... override settings in the user's web browser, ... if I choose automatic configuration ... We don't use the Firewall client and do not want to ...
    (microsoft.public.isa)