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. Web Service

Web Service

Scheduled Pinned Locked Moved ASP.NET
comtoolsquestion
6 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
    manojk_batra
    wrote on last edited by
    #1

    Hi All, I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? Even I gone through following article for implementation. http://www.codeproject.com/script/comments/user\_new.asp?forumid=12076&main=/script/comments/forums.asp But when I call method of dynamically changed URL, its raises an exception TimeOut. Thanks & Regards Manoj

    M 1 Reply Last reply
    0
    • M manojk_batra

      Hi All, I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? Even I gone through following article for implementation. http://www.codeproject.com/script/comments/user\_new.asp?forumid=12076&main=/script/comments/forums.asp But when I call method of dynamically changed URL, its raises an exception TimeOut. Thanks & Regards Manoj

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      manojk_batra wrote: I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? The proxy class generated at the client has the URL property, doesn't it?

      M 1 Reply Last reply
      0
      • M minhpc_bk

        manojk_batra wrote: I want to change Web Reference URL(of WebService) dynamically. Is there any way for that? The proxy class generated at the client has the URL property, doesn't it?

        M Offline
        M Offline
        manojk_batra
        wrote on last edited by
        #3

        Thanks for the answer, I does not know what is proxy class? how it is generated and used? With Rgards Manoj

        M 1 Reply Last reply
        0
        • M manojk_batra

          Thanks for the answer, I does not know what is proxy class? how it is generated and used? With Rgards Manoj

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          manojk_batra wrote: I does not know what is proxy class? This proxy class is an object which represents the web service at the client side. The client application in fact will invoke the proxy object which in turn dispatches the call to the web service. The proxy object then receives the result from the server side and turns back to the client. For more information on how it works , you can take a look at the model: Anatomy of an XML Web Service Lifetime[^] manojk_batra wrote: how it is generated and used? Basically, there are two ways to generate the proxy class. If you use VS to add reference to the web service (Add Web Reference) and you normally specify the URL to the service, VS will automatically generate the proxy class for you. You will find this class in the Web References folder, in the Reference.cs file. The proxy basically inherits from the SoapHttpClientProtocol base class, and the URL property basically holds the static URL that you specify when adding reference. Another way is to use the Wsdl.exe tool to manually generate the proxy class. For more information, you can see Generating an XML Web Service Proxy[^] As I said earlier, the proxy class inherits the public property URL[^] from the base class, and at runtime before invoking a web method you can dynamically assing a new URL to this property.

          M 1 Reply Last reply
          0
          • M minhpc_bk

            manojk_batra wrote: I does not know what is proxy class? This proxy class is an object which represents the web service at the client side. The client application in fact will invoke the proxy object which in turn dispatches the call to the web service. The proxy object then receives the result from the server side and turns back to the client. For more information on how it works , you can take a look at the model: Anatomy of an XML Web Service Lifetime[^] manojk_batra wrote: how it is generated and used? Basically, there are two ways to generate the proxy class. If you use VS to add reference to the web service (Add Web Reference) and you normally specify the URL to the service, VS will automatically generate the proxy class for you. You will find this class in the Web References folder, in the Reference.cs file. The proxy basically inherits from the SoapHttpClientProtocol base class, and the URL property basically holds the static URL that you specify when adding reference. Another way is to use the Wsdl.exe tool to manually generate the proxy class. For more information, you can see Generating an XML Web Service Proxy[^] As I said earlier, the proxy class inherits the public property URL[^] from the base class, and at runtime before invoking a web method you can dynamically assing a new URL to this property.

            M Offline
            M Offline
            manojk_batra
            wrote on last edited by
            #5

            Thanks for HELP. But still I need your Help. Actually I added the Web reference in VS and I got the Reference.cs file. I added the new contructor for a class which is derived from System.Web.Services.Protocols.SoapHttpClientProtocol. thats take the parameter of new URl String in which i modified the URL property as given in following article link http://www.codeproject.com/cs/webservices/CallXMLWebServices.asp With Regards Manoj

            M 1 Reply Last reply
            0
            • M manojk_batra

              Thanks for HELP. But still I need your Help. Actually I added the Web reference in VS and I got the Reference.cs file. I added the new contructor for a class which is derived from System.Web.Services.Protocols.SoapHttpClientProtocol. thats take the parameter of new URl String in which i modified the URL property as given in following article link http://www.codeproject.com/cs/webservices/CallXMLWebServices.asp With Regards Manoj

              M Offline
              M Offline
              minhpc_bk
              wrote on last edited by
              #6

              If you want to ask about the sample code of a specific article, you'd better post your question in the forum below the article.

              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