VB如何取webserivce里的返回的数组java返回的数组
我的开发环境vb6+soap3.0 +axis2 +tomcat 5.5
我java返回的是数组,用VB接收,变成了字符串了,请问如何才能接收数组?
public String[] personName()
{
String[] names={"sunhl","caoyl","jinyx"};
return names;
}
Dim objSoapClient30 As New SoapClient30
Dim result As Integer
Dim centense As String
Dim PersonNum As Integer
Dim personInfo() As String
objSoapClient30.mssoapinit ("http://localhost:8099/axis2/services/SimpleService?wsdl")
PersonNum = objSoapClient30.PersonNum()
'ReDim personInfo(1, 2) As String
personInfo = objSoapClient30.personName()
MsgBox VarType(objSoapClient30.personName()), vbOKOnly, "提示"
把personInfo定义成数组的时候运行时报类型不匹配,定义成字符串可以接收第一个值。
应该怎么才能接收整个数组,谢谢回复!!
[解决办法]
try:
Dim personInfo() As String
personInfo = objSoapClient30.personName()
[解决办法]
只会2级VB,帮不上忙,LZ给点分吧
dim A as string,B as string,c as string,D as string
D = ch(10) +ch(13)
A = "只会"
B = "2级VB“
C = "楼主好心人,给点分吧"
text1.text = A + D + B + D + C