webService(100分)

  • 主题发起人 主题发起人 linuxping
  • 开始时间 开始时间
L

linuxping

Unregistered / Unconfirmed
GUEST, unregistred user!
大家看看这个WebService

defWSDL = 'http://www.ayandy.com/Service.asmx?WSDL';
defURL = 'http://www.ayandy.com/Service.asmx';
defSvc = 'Service';
defPrt = 'ServiceSoap';

var
RIO:THttpRIO;
WS:ServiceSoap;
S:WideString;
aars:ArrayOfString;
I:Integer;
begin
try
RIO:=nil;
WS :=GetServiceSoap(True,'',RIO);

aars:=WS.getSupportProvince;
for I:=0 to Length(aars) do
Memo1.Lines.Append(aars);

SetLength(aars,256) ;
WS.getSupportCity('山东');
{
for I:=0 to Length(aars) do
Memo1.Lines.Append(aars);

aars:=WS.getWeatherbyCityName('shandong',Today) ;
for I:=0 to Length(aars) do
Memo1.Lines.Append(aars); }
except

end;
end;


单步这里错 WS.getSupportCity('山东');
 
如果传递的是string类型,需要在客户端加上如下部分:
initialization
InvRegistry.RegisterInvokeOptions(TypeInfo(XXXSoap), ioDocument);
其中XXXSoap为引用接口
 
后退
顶部