"Object reference not set" when calling web service

D

DaveO.

Hello,

I'm calling a VB.NET web service, also from VB.NET, and I get the error
" Object reference not set to an instance of an object" on the
following line in Reference.vb, when it tries to make the call:

Dim results() As Object = Me.Invoke("Phys_Post", New Object()
{SessionID, a, b, c, d, CountList})

I can call other web services I've written just fine. This one is more
complex in that it has an arraylist of structures as a parameter. In
the past I've found that I need to instantiate this as an empty array

Dim counts As localhost.Physicalcountlist()
counts = New localhost.Physicalcountlist() {}

and not just declare its type. But I still get the error. The other
parameters are just integers and strings, no arrays. I understand what
the error is saying, but I can't figure out exactly what it's referring
to, or why it's happening.

Any suggestions?

Thanks,
DaveO.
 
A

Armin Zingler

DaveO. said:
Hello,

I'm calling a VB.NET web service, also from VB.NET, and I get the
error " Object reference not set to an instance of an object" on the
following line in Reference.vb, when it tries to make the call:

Dim results() As Object = Me.Invoke("Phys_Post", New Object()
{SessionID, a, b, c, d, CountList})

I can call other web services I've written just fine. This one is
more complex in that it has an arraylist of structures as a
parameter. In the past I've found that I need to instantiate this as
an empty array

Dim counts As localhost.Physicalcountlist()
counts = New localhost.Physicalcountlist() {}

and not just declare its type. But I still get the error. The other
parameters are just integers and strings, no arrays. I understand
what the error is saying, but I can't figure out exactly what it's
referring to, or why it's happening.

Any suggestions?


Maybe you don't get an answer because other people also, like me, didn't
find an Invoke method taking a string as the first parameter. It's also not
clear what "Me" is. A WindowsForm? In that case, the first arg must be a
delegate.
This is only a hint. I probably won't be able to help you if it's a web
service problem.


Armin
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top