delphi调用web service出现 Unable to retrieve the URL endpoint  for Service/Port, 错误截图如下

delphi调用web service出现 Unable to retrieve the URL endpoint  for Service/Port .....-LMLPHP

查了很长时间, 发现在DataModule的Create事件中加入公用HttpRio控件初始化语句即可解决此问题.

TransDataHRIO.WSDLLocation:='http://ip地址/WS/TransData.asmx?WSDL';

TransDataHRIO.Service:= 'TransData';

TransDataHRIO.Port:='TransDataSoap';

04-28 14:26