【delphi开源代码栏目提醒】:以下是网学会员为您推荐的delphi开源代码-clientu1.pas,希望本篇文章对您学习有所帮助。
unit clientu1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dia
logs, StdCtrls,SoapHTTP
Client,clientu2;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit4: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
X:THTTPRio;
InterfaceVariable:IMyAddSub;
x1, x2:Integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
X := THTTPRio.Create(nil);
X.URL := 'http://
www.risksoft.com/webservice/
webstest.dll/soap/IMyAddSub';
{ X.WS
DLLocation := 'webs
test.wsdl';
X.Service := 'IMyAddSub
service';
X.Port := 'IMyAddSubPort'; }
InterfaceVariable := X as IMyAddSub;
x1:= InterfaceVariable.MyAdd(StrToInt(edit1.Text),StrTo
Int(edit2.Text));
x2:= InterfaceVariable.MySub(StrToInt(edit1.Text),StrToInt(edit2.Text));
edit3.Text:=IntToStr(x1);
edit4.Text:=IntToStr(x2);
end;
end.