// ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // WSDL : http://www.eimskipdepot.com:78/Service.asmx?WSDL // Encoding : utf-8 // Version : 1.0 // (2013-05-14 16:29:53 - 1.33.2.5) // ************************************************************************ // unit Service; interface uses InvokeRegistry, SOAPHTTPClient, 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://www.eimskipdepot.com/ // soapAction: http://www.eimskipdepot.com/P_GETDATA // transport : http://schemas.xmlsoap.org/soap/http // binding : ServiceSoap // service : Service // port : ServiceSoap // URL : http://www.eimskipdepot.com:78/Service.asmx // ************************************************************************ // ServiceSoap = interface(IInvokable) ['{E79FB042-4A90-DA4B-3296-ED68A1998E95}'] function P_GETDATA(const tdh: WideString; const id: WideString): WideString; stdcall; end; function GetServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): ServiceSoap; implementation function GetServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): ServiceSoap; const defWSDL = 'http://222.173.95.170:78/Service.asmx?WSDL'; defURL = 'http:/222.173.95.170:78/Service.asmx'; defSvc = 'Service'; defPrt = 'ServiceSoap'; 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 ServiceSoap); 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; initialization InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://www.eimskipdepot.com/', 'utf-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://www.eimskipdepot.com/P_GETDATA'); InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);//这一行有时会没有 { InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://www.eimskipdepot.com/', 'utf-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://www.eimskipdepot.com/P_GETDATA'); InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);//这一行有时会没有 } { InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://tempuri.org/', 'utf-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://tempuri.org/%operationName%'); InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);//这一行有时会没有 } end.