DELPHI:WSDL 导入错误

标签 delphi wsdl delphi-2005

使用 Delphi 2005,我从这里导入 WSDL:https://certtransaction.elementexpress.com/express.asmx?wsdl

当我导入此 WSDL 时,其中一种类型是“TransactionSetup”,它没有正确导入。根据文档“TransactionSetup”应具有以下内容:

<s:complexType name="TransactionSetup">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupAccountID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupAcceptorID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="TransactionSetupApplicationVersion" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="TransactionSetupMethod" type="tns:TransactionSetupMethod"/>
<s:element minOccurs="1" maxOccurs="1" name="Device" type="tns:Device"/>
<s:element minOccurs="1" maxOccurs="1" name="Embedded" type="tns:BooleanType"/>
<s:element minOccurs="1" maxOccurs="1" name="CVVRequired" type="tns:BooleanType"/>
<s:element minOccurs="1" maxOccurs="1" name="AutoReturn" type="tns:BooleanType"/>
<s:element minOccurs="0" maxOccurs="1" name="CompanyName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="LogoURL" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Tagline" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WelcomeMessage" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ReturnURL" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ReturnURLTitle" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="OrderDetails" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ProcessTransactionTitle" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ValidationCode" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="DeviceInputCode" type="tns:DeviceInputCode"/>
</s:sequence>
</s:complexType>

我得到的是:
  // ************************************************************************ //
  // Namespace : https://transaction.elementexpress.com
  // ************************************************************************ //
  TransactionSetup = class(TRemotable)
  private
    Fcredentials: Credentials;
    Fapplication: Application;
    Fterminal: Terminal;
    Ftransaction: Transaction;
    FtransactionSetup: TransactionSetup;
    Faddress: Address;
    FpaymentAccount: PaymentAccount;
    FextendedParameters: ArrayOfExtendedParameters;
  public
    destructor Destroy; override;
  published
    property credentials: Credentials read Fcredentials write Fcredentials;
    property application: Application read Fapplication write Fapplication;
    property terminal: Terminal read Fterminal write Fterminal;
    property transaction: Transaction read Ftransaction write Ftransaction;
    property transactionSetup: TransactionSetup read FtransactionSetup write FtransactionSetup;
    property address: Address read Faddress write Faddress;
    property paymentAccount: PaymentAccount read FpaymentAccount write FpaymentAccount;
    property extendedParameters: ArrayOfExtendedParameters read FextendedParameters write FextendedParameters;
  end;

我发现的一件事是,有一个方法和一个类型都名为“TransactionSetup”,并且导入器似乎以某种方式将方法的参数捕获为类型参数。这是导入的方法:
  ExpressSoap = interface(IInvokable)
  ['{83D77575-DBDE-3A05-D048-60B2F6BCDFE6}']
    procedure TransactionSetup(const credentials: Credentials; const application: Application; const terminal: Terminal; const transaction: Transaction; const transactionSetup: TransactionSetup; const address: Address; const paymentAccount: PaymentAccount; const extendedParameters: ArrayOfExtendedParameters; out response: Response); stdcall;

有没有办法让进口商获得“TransactionSetup”类型的正确类型参数?

最佳答案

我使用 Delphi 7。我遇到了类似的问题。我下载了更新导入器 WSDL 和 WebService/SOAP 运行时。此更新与 D2007、D7、D2005 和 D2006 兼容:
http://cc.embarcadero.com/Item/24535

如果您需要更多详细信息,请参阅我的博客。用西类牙语,对不起:
http://www.3engine.net/wp/2010/02/invocando-un-servicio-web-wcf-desde-delphi-7

关于DELPHI:WSDL 导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16066677/

相关文章:

delphi - AaWiz VCL 组件从 Delphi 5 迁移到 Delphi 2005

delphi - Indy 9 和 Windows Server 2003 之间不兼容?

delphi - 项目中 TActionManager 组件的数量

delphi - 在 64 位系统上使用小于 8 字节的指针有好处吗?

delphi - 使用 Windows DOM 和 TXMLDocument 验证 XML : doesn't work on some computers

delphi - 如何在 TVirtualDrawTree 中创建具有透明背景的节点?

Delphi 单元初始化并不总是被调用

delphi - SOAP:Delphi 2010 生成的 WSDL 定义中的错误错误

java - 将 MTOM 应用于 Web 服务时,WSDL 是否需要进行任何更改?

c# - ONVIF GetStreamURL C#