还有这个导入delphi的wdsl文件:
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : D:/wsdl/AmrService.wsdl
// Encoding : UTF-8
// Version : 1.0
// (2006-6-10 14:37:26 - 1.33.2.5)
// ************************************************************************ //
unit AmrService1;
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"
// !:short - "http://www.w3.org/2001/XMLSchema"
ArrayOf_xsd_string = array of WideString; { "http://t645.server.amr" }
// ************************************************************************ //
// Namespace : http://t645.server.amr
// transport : http://schemas.xmlsoap.org/soap/http
// style : rpc
// binding : AmrServiceSoapBinding
// service : AmrServiceService
// port : AmrService
// URL : http://localhost:8080/amr/services/AmrService
// ************************************************************************ //
AmrService = interface(IInvokable)
['{4A4F6B63-25F9-6463-2788-58D1D21449FD}']
function getRecentlyVa(const equipment_id: WideString): Smallint; stdcall;
function getActiveSpotList: ArrayOf_xsd_string; stdcall;
end;
function GetAmrService(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): AmrService;
implementation
function GetAmrService(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): AmrService;
const
defWSDL = 'D:/wsdl/AmrService.wsdl';
defURL = 'http://localhost:8080/amr/services/AmrService';
defSvc = 'AmrServiceService';
defPrt = 'AmrService';
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 AmrService);
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(AmrService), 'http://t645.server.amr', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(AmrService), '');
RemClassRegistry.RegisterXSInfo(TypeInfo(ArrayOf_xsd_string), 'http://t645.server.amr', 'ArrayOf_xsd_string');
end.