|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
"Object reference not set" when calling web serviceI'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.
Show quote
Hide quote
"DaveO." <daveoverb***@yahoo.com> schrieb Maybe you don't get an answer because other people also, like me, didn't> 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? 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
View Source from WebBrowser (2005)
Help authoring tool for Windows app? Menory compaction Please help with an 'impossible' error! datagrid and vertical gridline color IIF in vb.net acts weird.. or is it me Using the && operator in generated JavaScript Web service - business objects don't show up FTP with SSH Eventhandler |
|||||||||||||||||||||||