N
noall
Unregistered / Unconfirmed
GUEST, unregistred user!
服务端这样:用dotnet写<br>定义了一个结构体:<br>public struct ClientData<br>{<br> public String Name;<br> public int ID;<br>}<br><br> [WebMethod(CacheDuration = 30,<br> Description = "返回客户记录"]<br><br> public ClientData[] GetClientData111(int Number)<br> {<br> ClientData[] Clients = null;<br><br> if (Number > 0 && Number <= 10)<br> {<br> Clients = new ClientData[Number];<br> for (int i = 0; i < Number; i++)<br> {<br> Clients.Name = "Client " + i.ToString();<br> Clients.ID = i;<br> }<br> }<br> return Clients;<br> }<br><br><br><br>客户端调用:用bds2006写:<br>这样:<br>不知道如何写:返回的数组长度无法定义,如何接收呢???<br><br>var call1:ServiceSoap;<br> CallCleint:ArrayOfClientData;<br> i:Integer;<br>begin<br> call1:=GetServiceSoap();<br> CallCleint:=call1.GetClientData(3);<br> for I := Low(CallCleint) to High(CallCleint) do<br> ShowMessage(Format('%s ; %d',[CallCleint.Name_, CallCleint.ID]));<br>end;<br>编译可以通过...但运行到这里时.有问题;