rt

解决方案 »

  1.   

    添加一个接口文件,导入web service接口,详细看看李维的delphi 6/kylix2 soap/web service那本书
      

  2.   

    使用Delphi来调用WebService服务(另外写)
    1.新建一个空白的窗体工程
    2.New ->Other->WebServices->WSDL Importer,
      在Wsdl Source 中输入 “http://localhost/helloworld.asmx?wsdl”
      生成HelloWorld.pas ,其中包含一个HelloWorldSoap接口和GetHelloWorldSoap函数
    3.使用如下代码调用
    procedure TForm1.Button1Click(Sender: TObject);var hello:HelloWorldSoap ;begin  hello:=GetHelloWorldSoap;  Caption:=hello.SayHelloWorld ;
    end;
    成功了!!