Object reference Issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sonu.NET

    #1

    Object reference Issue

    Hello All,

    Try
    ' -- oFetch = http://webserviceURL.com/SomeService.wsdl ----

    Dim strRequest As oFetch.Package1 = New oFetch.Package1 ()
    Dim Service As oFetch.Service1 = New oFetch.Service1 ()

    strRequest.A1.t ype = oFetch.UniqueID Type.INTERNAL <<<<--- i'm
    getting an Error
    --------------------------------------------------------------------------------------------------------------
    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the
    current web request.
    Please review the stack trace for more information about the error and where
    it originated in the code.

    Exception Details: System.NullRefe renceException: Object reference not set
    to an instance of an object.

    Source Error:
    --------------------------------------------------------------------------------------------------------------
    strRequest.N1 = "1"
    strRequest.N2 = "0"
    strRequest.NR = "1"


    Dim strResponse As oFetch.Response 1 =
    Service.FetchAv ailablePackages (strRequest)
    TextBox1.Text = strResponse.Res ult.Text.ToStri ng

    Catch ex As System.IO.IOExc eption
    MsgBox(ex.Messa ge)
    End Try


    Can you tell me what I am doing wrong here?

    Thanks,
    Sonu



Working...