Delphi调用asp.net的WebService

procedure TForm1.Button1Click(Sender: TObject);

var
ss: ServiceSoap;
begin
try
HTTPRIO1.WSDLLocation :=
'http://localhost:4670/WebService/Service.asmx?wsdl';
HTTPRIO1.Service := 'Service';
HTTPRIO1.Port := 'ServiceSoap';
HTTPRIO1.HTTPWebNode.UseUTF8InHeader := True;

ss := (HTTPRIO1 as ServiceSoap);
ShowMessage(ss.HelloWorld('Hello, 大家好!'));
except
on e: exception do
showmessage(e.Message);
end;
end;
//解决中文传参的问题

 

你可能感兴趣的:(.net,webservice,asp.net,asp,Delphi)