need to add custom code to wsdl generated code

Results 1 to 2 of 2

Thread: need to add custom code to wsdl generated code

  1. #1
    Join Date
    Dec 1969

    Default need to add custom code to wsdl generated code

    I have a webservice & instead of having the URL for the asmx file hard coded into the SOAPInterface.cs file that is compiled into my project I use a url from a config file. So, instead of having to cut & paste the custom constructor every time is there a better way? there has to be.<BR><BR>In other words the wsdl utility generates this constructor:<BR><BR>public SOAPFooManager() {<BR> this.Url = http://localhost/FooWebService/SOAPFooManager.asmx";<BR>}<BR><BR>i would like to have this autogenerated as well:<BR> <BR>public SOAPFooManager(string URL) {<BR> this.Url = URL;<BR>}<BR><BR>thanks in advance

  2. #2
    Join Date
    Dec 1969

    Default Create a subclass?

    Derive a subclass from the auto-generated one and then put the constructor into the subclass? Regenerating the class then doesn&#039;t mess up your subclass?<BR><BR>Dunno if there are any private or protected methods that would cause you grief if you do this, but first instinct would be to say I doubt there are.<BR><BR>Hmmm??<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts