1)将WSDL地址通过Delphi 新建导入生成PAS文件;
2)打开该PAS文件,添加加粗字体的内容:
InvRegistry.RegisterInterface(TypeInfo(ismpSoap), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterAllSOAPActions(TypeInfo(ismpSoap),
InvRegistry.RegisterInvokeOptions(TypeInfo(ismpSoap), ioDocument);
注:ismpSoap为你的接口名称
3)添加调用事件
var
Inf: ismpSoap;
i: integer;
begin
Inf := GetismpSoap(True, '', nil);
i := Inf.ChangeNumberNotify(Param1,Param2,Param3);
end;
或者要求你的WS开发工程师用VS2005写的WebService的类属性中加入SoapRpcServiceAttribute属性就可以了,如 下:
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]