Error consuming web service

Discussion in 'ASP .Net Web Services' started by John, Jun 26, 2004.

  1. John

    John Guest

    Hi

    I am trying to access a web method which is on my local server from a vb.net
    client which is also on the same server. In client I am using the below code
    to access the web method. The problem is that I get an 'Object reference not
    set to an instance of an object.' error on the indicated line when I run the
    code. What am I doing wrong?

    Thanks

    Regards


    Dim ws As localhost.StaffDiary
    Dim ds As DataSet = ws.GetStaffDiary ' <=== error on this line
    John, Jun 26, 2004
    #1
    1. Advertising

  2. John

    DalePres Guest

    I think you have to use

    Dim ws As New localhost.StaffDiary

    Dale

    "John" <> wrote in message
    news:...
    > Hi
    >
    > I am trying to access a web method which is on my local server from a

    vb.net
    > client which is also on the same server. In client I am using the below

    code
    > to access the web method. The problem is that I get an 'Object reference

    not
    > set to an instance of an object.' error on the indicated line when I run

    the
    > code. What am I doing wrong?
    >
    > Thanks
    >
    > Regards
    >
    >
    > Dim ws As localhost.StaffDiary
    > Dim ds As DataSet = ws.GetStaffDiary ' <=== error on this line
    >
    >
    DalePres, Jun 26, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DNB
    Replies:
    1
    Views:
    254
  2. dgleeson422111

    Consuming local web service - ok, remote web service -problem?

    dgleeson422111, Jan 26, 2010, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    902
    dgleeson422111
    Jan 26, 2010
  3. J Ames

    proxy error when consuming web service

    J Ames, Jul 17, 2006, in forum: ASP .Net Web Services
    Replies:
    12
    Views:
    316
  4. Curt K
    Replies:
    3
    Views:
    452
    John Saunders [MVP]
    Jun 15, 2007
  5. DNB
    Replies:
    1
    Views:
    305
    John Saunders [MVP]
    Jan 20, 2008
Loading...

Share This Page