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. Web Development
  3. ASP.NET
  4. Dynamic web service in asp.net

Dynamic web service in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
3 Posts 3 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.
  • S Offline
    S Offline
    spmohanraj
    wrote on last edited by
    #1

    I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S

    M I 2 Replies Last reply
    0
    • S spmohanraj

      I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S

      M Offline
      M Offline
      Michael Flanakin
      wrote on last edited by
      #2

      Yes, that's possible. All adding a web reference does is creates a "proxy" class that your app uses to call the web service. I don't have the code on me now, but what I did when I had this problem was created the web reference and then modified the proxy class that it created to accept a URL in the constructor. Then, replace the places where it uses the URL you specified in the web reference with this private property. Hope this helps. Let me know if you need more guidance. Michael Flanakin Web Log

      1 Reply Last reply
      0
      • S spmohanraj

        I have a situation where in i have to call a webservice from my webapplication without having to create a WebReference in my application. Is this possible ?. For example: I have created a webservice Webservice:HelloWorldWebservice Webmethod: HelloWorld this webmethod returns a string "Hello" can i use this webservice in my application just by using the webservice name and its method. Thanks in Advance Mohanraj.S

        I Offline
        I Offline
        Ista
        wrote on last edited by
        #3

        http://www.dotnet247.com/247reference/msgs/3/18403.aspx[^] 1 line of code equals many bugs. So don't write any!! this will help create it at runtime -- modified at 12:22 Thursday 29th December, 2005

        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