找传奇、传世资源到传世资源站!

delphi调用webservice(不含webservice端代码)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

unit Unit1;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, SHDocVw;type TForm1 = class(TForm) WebBrowser1: TWebBrowser; Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementationuses ActiveX;{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);var sa, url:string; doc:olevariant; ms: TMemoryStream; i:integer;begin url:='http://192.168.32.1:9090/WebService_dyb.asmx/GetBXX?ph=651161910440'; WebBrowser1.Navigate(url); doc:= WebBrowser1.Document; repeat Application.ProcessMessages; until WebBrowser1.ReadyState=READYSTATE_COMPLETE; {while (WebBrowser1.Busy=True)or(WebBrowser1.ReadyState=READYSTATE_LOADING) do Application.ProcessMessages ; } Memo1.text:=webbrowser1.OleObject.document.body.innerText ; sa :=webbrowser1.OleObject.document.body.innerText; if pos('200',sa)>0 then showmessage('ok');end;end.

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复