【delphi开源代码栏目提醒】:以下是网学会员为您推荐的delphi开源代码-IGetCOMRecords1.pas,希望本篇文章对您学习有所帮助。
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://localhost:8081/pwsdemo8.wsdemo8/wsdl/IGetCOMRecords
// Encoding : utf-8
// Version : 1.0
// (2004-8-10 22:24:09 - 1.33.2.5)
// ************************************************************************ //
unit IGetCOMRecords1;
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"
// !:anyType - "http://www.w3.org/2001/XMLSchema"
// ************************************************************************ //
// Namespace : urn:GetCOMRecordsIntf-IGetCOMRecords
// soapAction: urn:GetCOMRecordsIntf-IGetCOMRecords#getcommethod
// transport : http://schemas.
xmlsoap.org/soap/http
// style : rpc
// binding : IGetCOMRecordsbinding
// service : IGetCOMRecordsservice
// port : IGetCOMRecordsPort
// URL : http://localhost:8081/pwsdemo8.wsdemo8/soap/IGetCOMRecords
// ************************************************************************ //
IGetCOMRecords = interface(IInvokable)
['{01CD3FD1-B93B-EE16-6EF5-7E64DC583E78}']
function QUERYBYCOM(const wscommon_name: WideString; var wscategory: Variant): Variant; stdcall;
end;
function GetIGetCOMRecords(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): IGetCOMRecords;
implementation
function GetIGetCOMRecords(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): IGetCOMRecords;
const
defWSDL = 'http://localhost:8081/pwsdemo8_SERVER.wsdemo8/wsdl/IGetCOMRecords';
defURL = 'http://localhost:8081/pwsdemo8_SERVER.wsdemo8/soap/IGetCOMRecords';
defSvc = 'IGetCOMRecordsservice';
defPrt = 'IGetCOMRecordsPort';
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 IGetCOMRecords);
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(IGetCOMRecords), 'urn:GetCOMRecordsIntf-IGetCOMRecords', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IGetCOMRecords), 'urn:GetCOMRecordsIntf-IGetCOMRecords#QUERYBYCOM');
end.