var Service: IMyService; Hdr: TAuthHeader; Val: Double; begin Service := HTTPRIO1 as IService; Hdr := TAUthHeader.Create; try Hdr.Name := 'Frank Borland'; Hdr.Password := 'SuperDelphi'; (Service as ISOAPHeaders).Send(Hdr); { add the header to outgoing message } Val := Service.GetQuote('BORL'); { invoke the service } finally Hdr.Free; end; end;
IMyService; 这个IMyService是怎么导入的呢?
我怎么激活我的Web Service Import呢? 我的Delphi中怎么没有这个呢?
delphi6安装sp2以后会出现Web Service Import。delphi7直接自带。
我现在用Web Service Import导入WSDL文档,它报了一个错误: UnKnown datatype"tp:ArrayOfString"
Service: IMyService;
Hdr: TAuthHeader;
Val: Double;
begin
Service := HTTPRIO1 as IService;
Hdr := TAUthHeader.Create;
try
Hdr.Name := 'Frank Borland';
Hdr.Password := 'SuperDelphi';
(Service as ISOAPHeaders).Send(Hdr); { add the header to outgoing message }
Val := Service.GetQuote('BORL'); { invoke the service }
finally
Hdr.Free;
end;
end;
这个IMyService是怎么导入的呢?
我的Delphi中怎么没有这个呢?
UnKnown datatype"tp:ArrayOfString"
<xsd:element xmlns:tp="java:language_builtins.lang" type="tp:ArrayOfString"......
如果顺利的话,我今天就会结贴
如还有问题,还请各位大侠不吝赐教