Files
dyp/pas/bgh_Service.pas
2026-05-07 20:25:34 +08:00

107 lines
3.7 KiB
ObjectPascal

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://home48.compeq.huizhou.gd.cn:8087/Service.asmx?wsdl
// >Import : http://home48.compeq.huizhou.gd.cn:8087/Service.asmx?wsdl>0
// Encoding : utf-8
// Version : 1.0
// (2023/8/16 15:47:13 - - $Rev: 96726 $)
// ************************************************************************ //
unit bgh_Service;
interface
uses Soap.InvokeRegistry, Soap.SOAPHTTPClient, System.Types, Soap.XSBuiltIns;
const
IS_OPTN = $0001;
IS_REF = $0080;
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 Embarcadero 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"[Gbl]
// ************************************************************************ //
// Namespace : http://tempuri.org/
// soapAction: http://tempuri.org/%operationName%
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// use : literal
// binding : ServiceSoap
// service : Service
// port : ServiceSoap
// URL : http://home48.compeq.huizhou.gd.cn:8087/Service.asmx
// ************************************************************************ //
ServiceSoap = interface(IInvokable)
['{77573149-9C57-FA51-F11F-EFD527C91BD9}']
function xxcf_get_basic_msg(const p_compeq_lot_num: string): string; stdcall;
function xxcf_chk_barcode(const p_compeq_lot_num: string; const pn: string; const face: string; const bc: string): string; stdcall;
end;
function GetServiceSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): ServiceSoap;
implementation
uses System.SysUtils;
function GetServiceSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): ServiceSoap;
const
defWSDL = 'http://home48.compeq.huizhou.gd.cn:8087/Service.asmx?wsdl';
defURL = 'http://home48.compeq.huizhou.gd.cn:8087/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
{ ServiceSoap }
InvRegistry.RegisterInterface(TypeInfo(ServiceSoap), 'http://tempuri.org/', 'utf-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(ServiceSoap), 'http://tempuri.org/%operationName%');
InvRegistry.RegisterInvokeOptions(TypeInfo(ServiceSoap), ioDocument);
{ ServiceSoap.xxcf_get_basic_msg }
InvRegistry.RegisterMethodInfo(TypeInfo(ServiceSoap), 'xxcf_get_basic_msg', '',
'[ReturnName="xxcf_get_basic_msgResult"]', IS_OPTN);
{ ServiceSoap.xxcf_chk_barcode }
InvRegistry.RegisterMethodInfo(TypeInfo(ServiceSoap), 'xxcf_chk_barcode', '',
'[ReturnName="xxcf_chk_barcodeResult"]', IS_OPTN);
end.