Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Web Service without VS2004

Web Service without VS2004

Scheduled Pinned Locked Moved C#
csharpwcfquestionworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Michael Potter
    wrote on last edited by
    #1

    I have created and consumed web services using C# and the VS2004 wizards. I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard. I have tried manipulating the files created by the wizard and have run into problems recompiling the code. The code seems to be heavily tied to the development environment. Is there any articles available on this topic? I have searched MSDN & Google. I have only found VS2004 way of doing things.

    N 1 Reply Last reply
    0
    • M Michael Potter

      I have created and consumed web services using C# and the VS2004 wizards. I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard. I have tried manipulating the files created by the wizard and have run into problems recompiling the code. The code seems to be heavily tied to the development environment. Is there any articles available on this topic? I have searched MSDN & Google. I have only found VS2004 way of doing things.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      Michael Potter wrote: I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard. If you are refering to the proxy class that is generated in Visual Studio when you "Add Web Reference", you can simply run the wdsl command line tool and pass it the web address to your web service, this will automatically generate the proxy class for you. There are a slew of options that you can specify such as the language used to generate the proxy, protocol to use (SOAP, HttpGet, HttpPost), a proxy domain and so on. I would recommend you take a look at Web Services Description Language Tool[^] for more information. - Nick Parker
      My Blog | My Articles

      M 1 Reply Last reply
      0
      • N Nick Parker

        Michael Potter wrote: I would like to create an object that will consume a web service without using VS2004 Web Service Reference wizard. If you are refering to the proxy class that is generated in Visual Studio when you "Add Web Reference", you can simply run the wdsl command line tool and pass it the web address to your web service, this will automatically generate the proxy class for you. There are a slew of options that you can specify such as the language used to generate the proxy, protocol to use (SOAP, HttpGet, HttpPost), a proxy domain and so on. I would recommend you take a look at Web Services Description Language Tool[^] for more information. - Nick Parker
        My Blog | My Articles

        M Offline
        M Offline
        Michael Potter
        wrote on last edited by
        #3

        Thanks, that gets me a step further along. What I am having trouble with is setting up multiple servers with the same Web Service (debug, testing, production). All that really needs to change is the URL. I would like to do this without developing 3 seperate references in my code.

        #if DEBUG
             private const string WS_URL = "DebugServer\TTCall.asmx"
        #else
             private const string WS_URL = "ProductionServer\TTCall.asmx"
        #endif
        

        I have experimented with changing the URL on the fly. It worked for awhile. After a reload of VS it began to bitch that things were not in order. Any one have a better way of dealing with this issue?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups