如何调用这个Webservice啊(100)

W

wxu

Unregistered / Unconfirmed
GUEST, unregistred user!
大家好,现在有这样一个Webservice,请教在客户端如何调用它啊?? // ************************************************************************ // // Namespace : http://www.xyz.com/oneclient-v2/ // soapAction: http://www.xyz.com/oneclient/InsertPolicy // transport : http://schemas.xmlsoap.org/soap/http // style : document // binding : oneclientSOAP // service : oneclient // port : oneclientSOAP // URL : http://12.12.12.12:3501/oneclient?wsdl // ************************************************************************ // oneclient = interface(IInvokable) ['{350E6DE8-CBD2-4F26-4466-7604F9206B25}'] // Cannot unwrap: // - More than one strictly out element was found function InsertPolicy(const InsertPolicy: InsertPolicy): InsertPolicyResponse2; stdcall; end;function Getoneclient(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): oneclient;implementation uses SysUtils;function Getoneclient(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): oneclient;const defWSDL = 'L:/ABCLtd/Clients/XYZ/HomeServe/oneclient-v2.wsdl'; defURL = 'http://12.12.12.12:3501/oneclient?wsdl'; defSvc = 'oneclient'; defPrt = 'oneclientSOAP';var RIO: THTTPRIO;begin Result := nil; if (Addr = '') then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; if HTTPRIO = nil then RIO := THTTPRIO.Create(nil) else RIO := HTTPRIO; try Result := (RIO as oneclient); if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; end else RIO.URL := Addr; finally if (Result = nil) and (HTTPRIO = nil) then RIO.Free; end;end;最好有实例,谢谢大家啦
 
[:(]有没有人知道啊。。。。
 
晕,没人回复[:(]
 
大概这样:var sw:eek:neclient; InsertPolicy: InsertPolicybegin sw:=Getoneclient(); InsertPolicy:=InsertPolicy.Create; InsertPolicy.OneClientChannel:='xxxx'; InsertPolicy.xxx:=xxx; //.... sw.InsertPolicy(InsertPolicy); //..end;谁给你提供的webservice应该有说明文档,说明哪个参数是什么意思
 
谢谢wzwcn的回复,我试一下啊[:D]
 
多人接受答案了。
 
顶部