469,960 Members | 2,660 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,960 developers. It's quick & easy.

"Object reference not set" when calling web service

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.

Feb 28 '06 #1
1 2258
"DaveO." <da**********@yahoo.com> schrieb
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

Mar 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Lionel | last post: by
3 posts views Thread by =?Utf-8?B?QmFkaXM=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.