// ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // WSDL : http://www.cmlog.com:8003/cmlwebservice/caragtquery/caragtquery_LH.asmx?wsdl // Encoding : utf-8 // Version : 1.0 // (2017-04-11 14:35:35 - $Revision: 1.9.1.0.1.0.1.9 $) // ************************************************************************ // unit caragtquery_LH1; interface uses InvokeRegistry, Types, XSBuiltIns; type // ************************************************************************ // // The following types, referred to in the WSDL document are not being represented // in this file. They are either aliases[@] of other types represented or were referred // to but never[!] declared in the document. The types from the latter category // typically map to predefined/known XML or Borland types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:string - "http://www.w3.org/2001/XMLSchema" // ************************************************************************ // // Namespace : http://tempuri.org/ // soapAction: http://tempuri.org/%operationName% // transport : http://schemas.xmlsoap.org/soap/http // binding : CaragtQuery_LHSoap // service : CaragtQuery_LH // port : CaragtQuery_LHSoap // URL : http://www.cmlog.com:8003/cmlwebservice/caragtquery/caragtquery_LH.asmx // ************************************************************************ // CaragtQuery_LHSoap = interface(IInvokable) ['{9309F29C-8A9D-DAF7-C7F3-FF8DC605DB54}'] function GetInfo(const mbillno: String; const key: String): String; stdcall; function GetInfoGlx(const mbillno: String; const key: String): String; stdcall; end; function GetCaragtQuery_LHSoap(UseWSDL: Boolean=System.False; Addr: string=''): CaragtQuery_LHSoap; implementation uses SOAPHTTPClient; function GetCaragtQuery_LHSoap(UseWSDL: Boolean; Addr: string): CaragtQuery_LHSoap; const defWSDL = 'http://www.cmlog.com:8003/cmlwebservice/caragtquery/caragtquery_LH.asmx?wsdl'; defURL = 'http://www.cmlog.com:8003/cmlwebservice/caragtquery/caragtquery_LH.asmx'; defSvc = 'CaragtQuery_LH'; defPrt = 'CaragtQuery_LHSoap'; var RIO: THTTPRIO; begin Result := nil; if (Addr = '') then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; RIO := THTTPRIO.Create(nil); try if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; RIO.HTTPWebNode.UseUTF8InHeader := true; InvRegistry.RegisterInvokeOptions(TypeInfo(CaragtQuery_LHSoap), ioDocument); //就是这一行 end else RIO.URL := Addr; Result := (RIO as CaragtQuery_LHSoap); finally if Result = nil then RIO.Free; end; end; initialization InvRegistry.RegisterInterface(TypeInfo(CaragtQuery_LHSoap), 'http://tempuri.org/', 'utf-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(CaragtQuery_LHSoap), 'http://tempuri.org/%operationName%'); end.