Consuming a SOAP Vector Type from .Net

W

wawa_piggy

I have exposed my Java web services to receive a SOAP Vector type and to
return results as a SOAP Vector.
Both vectors should contain Arrays of String.
My .net web application need to consume this web service and I have
added a web refernce to this Java web services.
But i encountered some "Object Reference Not Set To An Instance" error
in the following chunk of code.

Did i do something wrong here????
Thanks.


:
:
Dim arr1 As String() = {"1", "2"} 'an array of String
Dim arr2 As String() = {"3", "4"}
Dim arr3 As String() = {"5", "6"}
'' stockAppl is the project name
'' Enq is the web reference name
'' Vector is the class name
Dim myVector As New stockAppl.Enq.Vector()
myVector.item.SetValue(arr1, 0)
myVector.item.SetValue(arr2, 1)
myVector.item.SetValue(arr3, 2)

Dim abc As New stockAppl.Enq.EnquireStockWSService()
Dim myAL2 As stockAppl.Enq.Vector() = abc.EnquireStockWS(

:
:
:
 
N

NM

Dim arr1 As String() = {"1", "2"} 'an array of String
Dim arr2 As String() = {"3", "4"}
Dim arr3 As String() = {"5", "6"}
'' stockAppl is the project name
'' Enq is the web reference name
'' Vector is the class name
Dim myVector As New stockAppl.Enq.Vector()
myVector.item.SetValue(arr1, 0)
myVector.item.SetValue(arr2, 1)
myVector.item.SetValue(arr3, 2)

Dim abc As New stockAppl.Enq.EnquireStockWSService()
Dim myAL2 As stockAppl.Enq.Vector() = abc.EnquireStockWS(

In your last instruction, You've declared an array of Vector and you return
just 1 Vector :
Dim myAL2 As stockAppl.Enq.Vector = abc.EnquireStockWS(...)
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top