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. Mobile Development
  3. Mobile
  4. Urgent: how to reference a webservice at runtime from Pocket PC?

Urgent: how to reference a webservice at runtime from Pocket PC?

Scheduled Pinned Locked Moved Mobile
helpdesigntutorialquestion
4 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    hi all, My pocket PC app allows user to configure WebServer's IP address, so I have to reference a webservice at runtime. Adding "webreference" at design time is created proxy class that's stuck with hard-coded Webserver IP. Can anyone help me this matter? Many thanks, Regards, K

    D 1 Reply Last reply
    0
    • L Lost User

      hi all, My pocket PC app allows user to configure WebServer's IP address, so I have to reference a webservice at runtime. Adding "webreference" at design time is created proxy class that's stuck with hard-coded Webserver IP. Can anyone help me this matter? Many thanks, Regards, K

      D Offline
      D Offline
      Dimitris Iliopoulos
      wrote on last edited by
      #2

      the soaphttpclientprotocol class that the your proxy class derive from has the url property which you can use to do what you want, you can view also the code of the proxy and modify this thing within the derived class. From Greece: Dimitris Iliopoulos dimilio@yahoo.com

      L M 2 Replies Last reply
      0
      • D Dimitris Iliopoulos

        the soaphttpclientprotocol class that the your proxy class derive from has the url property which you can use to do what you want, you can view also the code of the proxy and modify this thing within the derived class. From Greece: Dimitris Iliopoulos dimilio@yahoo.com

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        It's not easy and simple as your thought. I've been tried to change URl property at runtime but it's thrown an exception: An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll Additional information: Server did not recognize the value of HTTP Header SOAPAction: http://MobileServer/WebService1/HelloWorld. FYI: "http://MobileServer/WebService1" is webreference at design time "http://thoantm I can see in so many materials from many forums that we can change URL at run time, but I can't perform that task although I try both Windows App and Pocket PC app. Any help would be very appreciated, K

        1 Reply Last reply
        0
        • D Dimitris Iliopoulos

          the soaphttpclientprotocol class that the your proxy class derive from has the url property which you can use to do what you want, you can view also the code of the proxy and modify this thing within the derived class. From Greece: Dimitris Iliopoulos dimilio@yahoo.com

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

          I had changed the url of webservice but i did not work. ws on machine "mobileserver" has a method HelloWorld which returns a String "Hello world from Mobileserver" another ws on machine "thoantm" also has a method HellowWrld which returns a String "Hello from ThoaNTM" My code: Dim ws As New mobileserver.OkieWS MsgBox(ws.HelloWord) ws.Url = "http://thoantm/OkieWS/Service1.asmx" MsgBox(ws.Url) ws.HelloWorld()'exception was thrown when invoke this method I met the following exception: An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll Additional information: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://mobileserver/OkieWS/Service1/HelloWorld. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) I also tried to change the namespace of ws on machine thoantm to "http://mobileserver/OkieWS/Sevice1.asmx" its original namespace is "http://thoantm/OkieWS/Sevice1.asmx" and I met the following exception when I called webmethod of ws on thoantm An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll Additional information: Unable to connect to the remote server I can not change the url behavior of webreference to dynamic cause i'm coding in .net CF Thanks for ur time. Pls help me! :((

          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