Web Service Call - SoapException

Discussion in 'ASP .Net Web Services' started by Barbara Alderton, May 12, 2005.

  1. I need to call a custom web service, which I send a dataset to. I am writing
    it in vb.net, with a Proxy server, also written in vb.net. The web service
    is written in C#. I am getting the following error:

    System.Web.Services.Protocols.SoapException: Server was unable to process
    request. ---> System.NullReferenceException: Object reference not set to an
    instance of an object. at <class>.<function name>(DataSet inDataSet) --- End
    of inner exception stack trace ---

    I have traced through the process, and my dataset(created by adding a
    datatable to) has values just prior to the call. Why does the web service
    think that the object is not set to an instance of an object? I have also
    included part of the proxy code for further info.

    '<remarks/>
    <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/<path>/<functionname>",
    RequestNamespace:="http://tempuri.org/<path>",
    ResponseNamespace:="http://tempuri.org/<path> ",
    Use:=System.Web.Services.Description.SoapBindingUse.Literal,
    ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
    Public Function functionname(ByVal inDataset As System.Data.DataSet)
    As String
    Dim results() As Object = Me.Invoke("functionname", New Object()
    {inDataset})
    Return CType(results(0), String)
    End Function

    '<remarks/>
    Public Function Begin<functionname>(ByVal inDataset As
    System.Data.DataSet, ByVal callback As System.AsyncCallback, ByVal asyncState
    As Object) As System.IAsyncResult
    Return Me.BeginInvoke("functionname", New Object() {inDataset},
    callback, asyncState)
    End Function

    '<remarks/>
    Public Function End<functionname>(ByVal asyncResult As
    System.IAsyncResult) As String
    Dim results() As Object = Me.EndInvoke(asyncResult)
    Return CType(results(0), String)
    End Function
    Barbara Alderton, May 12, 2005
    #1
    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. Michael Averstegge
    Replies:
    0
    Views:
    4,204
    Michael Averstegge
    Jan 10, 2006
  2. Chris
    Replies:
    0
    Views:
    342
    Chris
    Jan 31, 2007
  3. Not Me
    Replies:
    1
    Views:
    3,174
    Not Me
    Jun 5, 2007
  4. Mark A. Deal

    Does a SOAPException throw exit a function call?

    Mark A. Deal, Feb 25, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    157
    Mark A. Deal
    Feb 25, 2005
  5. dave
    Replies:
    0
    Views:
    145
Loading...

Share This Page