You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.3 KiB
Plaintext

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://www.lhl.cn:8190/WebServiceTest/services/myService?wsdl
// >Import : http://www.lhl.cn:8190/WebServiceTest/services/myService?wsdl>0
// Encoding : UTF-8
// Version : 1.0
// (2014-03-03 9:27:51 - - $Rev: 24171 $)
// ************************************************************************ //
unit myService;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
const
IS_OPTN = $0001;
IS_NLBL = $0004;
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://service
// soapAction: urn:CntrMess
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : myServiceSoap12Binding
// service : myService
// port : myServiceHttpSoap12Endpoint
// URL : http://www.lhl.cn:8190/WebServiceTest/services/myService.myServiceHttpSoap12Endpoint/
// ************************************************************************ //
myServicePortType = interface(IInvokable)
['{1F39918F-347F-F507-DF1E-45D1BE5028F3}']
function CntrMess(const blno: string): string; stdcall;
end;
function GetmyServicePortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): myServicePortType;
implementation
uses SysUtils;
function GetmyServicePortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): myServicePortType;
const
defWSDL = 'http://www.lhl.cn:8190/WebServiceTest/services/myService?wsdl';
defURL = 'http://www.lhl.cn:8190/WebServiceTest/services/myService.myServiceHttpSoap12Endpoint/';
defSvc = 'myService';
defPrt = 'myServiceHttpSoap12Endpoint';
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 myServicePortType);
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(myServicePortType), 'http://service', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(myServicePortType), 'urn:CntrMess');
InvRegistry.RegisterInvokeOptions(TypeInfo(myServicePortType), ioDocument);
//InvRegistry.RegisterInvokeOptions(TypeInfo(myServicePortType), ioSOAP12);
end.