// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://10.143.47.8:8081/erpspeedtest/services/Speedtest?wsdl
// Encoding : UTF-8
// Version : 1.0
// (2009-5-26 16:45:23 - $Revision: 1.9.1.0.1.0.1.9 $)
// ************************************************************************ //
unit Speedtest;
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://erp/Speedtest
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// binding : SpeedtestHttpBinding
// service : Speedtest
// port : SpeedtestHttpPort
// URL : http://10.143.47.8:8081/erpspeedtest/services/Speedtest
// ************************************************************************ //
SpeedtestPortType = interface(IInvokable)
['{489F3809-0801-5C4D-1B31-4FA82DE9D890}']
function Speedtest: String; stdcall;
end;
function GetSpeedtestPortType(UseWSDL: Boolean; Addr: string): SpeedtestPortType;
implementation
uses SOAPHTTPClient;
function GetSpeedtestPortType(UseWSDL: Boolean; Addr: string): SpeedtestPortType;
const
defWSDL = 'http://10.143.47.8:8081/erpspeedtest/services/Speedtest?wsdl';
defURL = 'http://10.143.47.8:8081/erpspeedtest/services/Speedtest';
defSvc = 'Speedtest';
defPrt = 'SpeedtestHttpPort';
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;
end else
RIO.URL := Addr;
Result := (RIO as SpeedtestPortType);
finally
if Result = nil then
RIO.Free;
end;
end;
initialization
InvRegistry.RegisterInterface(TypeInfo(SpeedtestPortType), 'http://erp/Speedtest', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(SpeedtestPortType), '');
InvRegistry.RegisterInvokeOptions(TypeInfo(SpeedtestPortType), ioDocument);
end. |