Web services Delphi7中的WSDL导入问题
我有一个WSDL,我试图在Delphi7中导入它,但我得到了下一条消息Web services Delphi7中的WSDL导入问题,web-services,delphi,wsdl,delphi-7,Web Services,Delphi,Wsdl,Delphi 7,我有一个WSDL,我试图在Delphi7中导入它,但我得到了下一条消息 // ************************************************************************ // // The types declared in this file were generated from data read from the // WSDL File described below: // WSDL : http://201.155.18
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl
// Encoding : UTF-8
// Version : 1.0
// (12/04/2011 08:57:28 a.m. - 1.33.2.5)
// ************************************************************************ //
unit TimbradorIntegradores;
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.
// ************************************************************************ //
implementation
initialization
end.
我在读一些关于它的文章,很多人说这是Delphi的版本,我在用Delphi 7,他们说Delphi 10有可能做到这一点,有人知道吗
提前感谢,,
以下是德尔福XE对它的评价 我认为它可以在Delphi7中编译,如果可以,请告诉我们
// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL : http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl
// >Import : http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl>0
// Encoding : UTF-8
// Version : 1.0
// (4/12/2011 4:32:56 PM - - $Rev: 34800 $)
// ************************************************************************ //
unit TimbradorIntegradores;
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]
// !:anyType - "http://www.w3.org/2001/XMLSchema"[Gbl]
Exception2 = class; { "http://integradores.cfdi.mx.konesh.com"[GblCplx] }
Exception = class; { "http://integradores.cfdi.mx.konesh.com"[Flt][GblElm] }
// ************************************************************************ //
// XML : Exception, global, <complexType>
// Namespace : http://integradores.cfdi.mx.konesh.com
// ************************************************************************ //
Exception2 = class(TRemotable)
private
FException: Variant;
FException_Specified: boolean;
procedure SetException(Index: Integer; const AVariant: Variant);
function Exception_Specified(Index: Integer): boolean;
published
property Exception: Variant Index (IS_OPTN or IS_NLBL) read FException write SetException stored Exception_Specified;
end;
// ************************************************************************ //
// XML : Exception, global, <element>
// Namespace : http://integradores.cfdi.mx.konesh.com
// Info : Fault
// ************************************************************************ //
Exception = class(ERemotableException)
private
FException: Exception2;
FException_Specified: boolean;
procedure SetException(Index: Integer; const AException2: Exception2);
function Exception_Specified(Index: Integer): boolean;
public
destructor Destroy; override;
published
property Exception: Exception2 Index (IS_OPTN or IS_NLBL) read FException write SetException stored Exception_Specified;
end;
// ************************************************************************ //
// Namespace : http://integradores.cfdi.mx.konesh.com
// soapAction: urn:get
// transport : http://schemas.xmlsoap.org/soap/http
// style : document
// use : literal
// binding : TimbradorIntegradoresSoap12Binding
// service : TimbradorIntegradores
// port : TimbradorIntegradoresHttpSoap12Endpoint
// URL : http://201.155.181.40:59080/axis2/services/TimbradorIntegradores.TimbradorIntegradoresHttpSoap12Endpoint/
// ************************************************************************ //
TimbradorIntegradoresPortType = interface(IInvokable)
['{85D3323D-9BEE-180B-C748-39D139E150FE}']
function get(const cad: string; const tk: string; const user: string; const pass: string; const cuenta: string): string; stdcall;
end;
function GetTimbradorIntegradoresPortType(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): TimbradorIntegradoresPortType;
implementation
uses SysUtils;
function GetTimbradorIntegradoresPortType(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): TimbradorIntegradoresPortType;
const
defWSDL = 'http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl';
defURL = 'http://201.155.181.40:59080/axis2/services/TimbradorIntegradores.TimbradorIntegradoresHttpSoap12Endpoint/';
defSvc = 'TimbradorIntegradores';
defPrt = 'TimbradorIntegradoresHttpSoap12Endpoint';
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 TimbradorIntegradoresPortType);
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;
procedure Exception2.SetException(Index: Integer; const AVariant: Variant);
begin
FException := AVariant;
FException_Specified := True;
end;
function Exception2.Exception_Specified(Index: Integer): boolean;
begin
Result := FException_Specified;
end;
destructor Exception.Destroy;
begin
SysUtils.FreeAndNil(FException);
inherited Destroy;
end;
procedure Exception.SetException(Index: Integer; const AException2: Exception2);
begin
FException := AException2;
FException_Specified := True;
end;
function Exception.Exception_Specified(Index: Integer): boolean;
begin
Result := FException_Specified;
end;
initialization
{ TimbradorIntegradoresPortType }
InvRegistry.RegisterInterface(TypeInfo(TimbradorIntegradoresPortType), 'http://integradores.cfdi.mx.konesh.com', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(TimbradorIntegradoresPortType), 'urn:get');
InvRegistry.RegisterInvokeOptions(TypeInfo(TimbradorIntegradoresPortType), ioDocument);
InvRegistry.RegisterInvokeOptions(TypeInfo(TimbradorIntegradoresPortType), ioSOAP12);
{ TimbradorIntegradoresPortType.get }
InvRegistry.RegisterMethodInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', '',
'[ReturnName="return"]', IS_OPTN or IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'cad', '',
'', IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'tk', '',
'', IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'user', '',
'', IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'pass', '',
'', IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'cuenta', '',
'', IS_NLBL);
InvRegistry.RegisterParamInfo(TypeInfo(TimbradorIntegradoresPortType), 'get', 'return', '',
'', IS_NLBL);
RemClassRegistry.RegisterXSClass(Exception2, 'http://integradores.cfdi.mx.konesh.com', 'Exception2', 'Exception');
RemClassRegistry.RegisterXSClass(Exception, 'http://integradores.cfdi.mx.konesh.com', 'Exception');
end.
/***************************************************************************************************//
//此文件中声明的类型是从
//如下所述的WSDL文件:
//WSDL:http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl
//>导入:http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl>0
//编码:UTF-8
//版本:1.0
//(2011年4月12日下午4:32:56---$Rev:34800$)
// ************************************************************************ //
Timbradorintegraderes单位;
接口
使用InvokeRegistry、SOAPHTTPClient、类型、XSBuiltIns;
常数
IS_OPTN=$0001;
IS_NLBL=0004美元;
IS_REF=$0080;
类型
// ************************************************************************ //
//未表示WSDL文档中引用的以下类型
//在这个文件中。它们要么是其他类型的别名[@],要么被引用
//但从未在文件中声明[!]。后一类的类型
//通常映射到预定义/已知的XML或Embarcadero类型;然而,他们也可以
//指示未能声明或导入架构类型的错误WSDL文档。
// ************************************************************************ //
// !:串——http://www.w3.org/2001/XMLSchema“[Gbl]
// !:任何类型—http://www.w3.org/2001/XMLSchema“[Gbl]
例外2=类别;{ "http://integradores.cfdi.mx.konesh.com“[GblCplx]}
异常=类;{ "http://integradores.cfdi.mx.konesh.com“[Flt][GblElm]}
// ************************************************************************ //
//XML:异常,全局,
//名称空间:http://integradores.cfdi.mx.konesh.com
// ************************************************************************ //
例外2=类别(可旋转)
私有的
FException:变体;
指定的FEException_:布尔值;
过程SetException(索引:整数;常量:变量);
指定的函数异常_(索引:整数):布尔值;
出版
属性异常:指定了变量索引(IS_OPTN或IS_NLBL)read feexception write SetException storage Exception;
结束;
// ************************************************************************ //
//XML:异常,全局,
//名称空间:http://integradores.cfdi.mx.konesh.com
//信息:故障
// ************************************************************************ //
异常=类(ERemotableException)
私有的
f例外:例外2;
指定的FEException_:布尔值;
过程SetException(索引:整数;常量AEException2:Exception2);
指定的函数异常_(索引:整数):布尔值;
公众的
毁灭者毁灭;推翻
出版
属性异常:指定了异常2索引(IS_OPTN或IS_NLBL)read feexception write SetException storage Exception;
结束;
// ************************************************************************ //
//名称空间:http://integradores.cfdi.mx.konesh.com
//soapAction:urn:get
//运输:http://schemas.xmlsoap.org/soap/http
//样式:文档
//用法:字面
//绑定:TimbradorintegradoRessoap12绑定
//服务:TimbradorIntegradores
//端口:TimbradorIntegradoresHttpSoap12Endpoint
//网址:http://201.155.181.40:59080/axis2/services/TimbradorIntegradores.TimbradorIntegradoresHttpSoap12Endpoint/
// ************************************************************************ //
TimbradorIntegradoresPortType=接口(IInvokable)
[{85D3323D-9BEE-180B-C748-39D139E150FE}]
函数get(const cad:string;const tk:string;const user:string;const pass:string;const cuenta:string):string;stdcall;
结束;
函数gettimbradorintegradoresorttype(usewdl:Boolean=System.False;Addr:string='';HTTPRIO:THTTPRIO=nil):timbradorintegradoresorttype;
实施
使用SysUtils;
函数gettimbradorintegradoresorttype(usewdl:Boolean;Addr:string;HTTPRIO:THTTPRIO):timbradorintegradoresorttype;
常数
定义http://201.155.181.40:59080/axis2/services/TimbradorIntegradores?wsdl';
defull='1〕http://201.155.181.40:59080/axis2/services/TimbradorIntegradores.TimbradorIntegradoresHttpSoap12Endpoint/';
defSvc=‘TimbradorIntegradores’;
defPrt='TimbradorIntegradoresHttpSoap12Endpoint';
变量
里约:THTTPRIO;
开始
结果:=无;
如果(Addr=''),则
开始
如果使用WSDL,则
地址:=defWSDL
其他的
地址:=defURL;
结束;
如果HTTPRIO=nil,则
RIO:=THTTPRIO.Create(无)
其他的
里约:=HTTPRIO;
尝试
结果:=(里约作为TimbradorIntegradoresPortType);
如果使用WSDL,则
开始
RIO.WSDLLocation:=Addr;
服务:=defSvc;
里约热内卢港口:=defPrt;
结束其他
RIO.URL:=Addr;
最后
如果(Result=nil)和(HTTPRIO=nil),则
里约.自由;
结束;
结束;
过程异常2.SetException(索引:整数;常量:变量);
开始
FEException:=先锋;
指定的FEException_:=真;
结束;
函数异常2.指定的异常(索引:整数):布尔值;
开始
结果:=指定的FEException_;
结束;
析构函数异常;
开始
SysUtils.FreeAndNil(feexception);
继承性破坏;
结束;
过程异常.SetException(索引:整数;常量AEException2:Exception2);
开始
FEException:=AEException2;
指定的FEException_:=真;
结束;
函数异常。指定了异常(索引:整数