Delphi动态调用Java的WebService 转

Delphi动态调用Java的WebService —— 基于“Axis2发布WebService例子(HelloWorld)”

uses ComObj;

var

WsObject: Variant;

reslt:String;

name:String;

begin

try

//WsObject:=Unassigned;

try

WsObject := CreateOleObject('MSOSOAP.SoapClient30');

except

WsObject := CreateOleObject('MSSOAP.SoapClient30');

end;

try

WsObject.mssoapinit('http://localhost:8080/HelloWorld/services/HelloWorld?wsdl');

ShowMessage('存储服务连接成功!');

finally

end;

except on E: Exception do

ShowMessage('存储服务连接失败!!错误信息:' + E.Message);

end;

name:='gan';

reslt:=WsObject.gethelloWorld(name);

ShowMessage(reslt);

end.

上一篇:delphi7编写客户端调用java服务器端webservice示例


下一篇:Delphi调用JAVA的WebService上传XML文件(XE10.2+WIN764)