Results 1 to 3 of 3

Thread: Accessing a web service from a web page

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Ireland
    Posts
    99

    Accessing a web service from a web page

    Hi Folks,
    How do I reference an instance of a web service (proxy class) from an aspx page. Im actually using the Dataservice, dataserviceclient example from the SDk's ASP.Net Web Services samples. Im trying to get them running myself. Ive created the dataservice web service as a project and Ive and placed a wsdl created proxy in the web service apps /bin folder. I created the web service client by cutting and pasting the code + html from the (sdk examples) dataservice client into a text file and saving this as dataserviceclient.aspx. When I try to load dataserviceclient.aspx in the browser I get a
    Compilation error Message: Type is not defined 'DataServiceVB.dataservice'. Im obviously omitting something trivial. Any help would be much appreciated.
    Cheers
    Mick Lennon
    Ireland

  2. #2
    zchoyt
    Guest
    Did you make a referance to the webservice?

    If not, here is how.
    Right click on your project in solution explorer, and select add web referance.

  3. #3
    zchoyt
    Guest
    And then make an instance of it


    In Vb:
    Dim WS as new webservice

    The you can access the properties and methods
    WS.codeisfun = True
    WS.DrinkBeer("Hamms")

Posting Permissions

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



Click Here to Expand Forum to Full Width