將WSDL導入Delphi 7時出現堆棧溢出錯誤



delphi-7 (1)

我正在嘗試使用WSDLImporter(以及WSDLImp命令行)將WSDL導入到Delphi 7中。

當使用WSDLImporter時,Delphi的內存使用量開始增加,直到它崩潰(沒有錯誤),或者我得到一個堆棧溢出錯誤。

當使用命令行工具時,我得到以下內容

Borland WSDLIMP Version 2.2 - $Rev: 10138 $
Copyright (c) 2007 Borland Software Corporation
Reading: https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl
Import : https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl:0
*Error*: http://api.demo.ezidebit.com.au/v3-3/nonpci?xsd=xsd0
*Error*: http://api.demo.ezidebit.com.au/v3-3/nonpci?xsd=xsd1
*Error*: http://api.demo.ezidebit.com.au/v3-3/nonpci?xsd=xsd2
Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl=wsdl0
Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl
Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl=wsdl0
Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl

然後循環遍歷最後2行。 顯然這顯示了一個錯誤,但沒有進一步的細節可能是什麼錯誤。

我在Microsoft Visual Studio中創建了一個C#項目,並將其作為Web引用添加,沒有任何問題,但是由於遺留代碼,我需要在Delphi 7中使用它。

WSDL的地址是

https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl

我也試圖加載這個使用soapUI沒有任何錯誤。

編輯我已經下載了德爾福XE2的試用版(在另一個問題中提到作為一種可能的解決方案),它給了我以下在我的PAS文件的頂部。 (如果需要,我可以上傳整個代碼)

我假設德爾福不喜歡的WSDL文件存在問題。 我可以要求WSDL開發人員進行更改的任何線索,以便導入?

// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl
//  >Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl=wsdl0
//  >Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl
//  >Import : https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl>0
//  >Import : http://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl>0
// Encoding : utf-8
// Version  : 1.0
// (9/02/2012 2:32:14 PM - - $Rev: 37707 $)
// ************************************************************************ //

unit nonpci;

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 Embarcadero types; however, they could also 
  // indicate incorrect WSDL documents that failed to declare or import a schema type.
  // ************************************************************************ //
  // !:CreateScheduleResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:CreateSchedule  - "https://px.ezidebit.com.au/"[Lit][]
  // !:ClearScheduleResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:ClearSchedule   - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeScheduledAmountResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPayments     - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentDetailPlusNextPaymentInfoResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeScheduledAmount - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentsResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeScheduledDate - "https://px.ezidebit.com.au/"[Lit][]
  // !:IsSystemLockedResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:IsSystemLocked  - "https://px.ezidebit.com.au/"[Lit][]
  // !:PaymentExchangeVersionResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:PaymentExchangeVersion - "https://px.ezidebit.com.au/"[Lit][]
  // !:IsBsbValidResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:TestFunction    - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeScheduledDateResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:IsBsbValid      - "https://px.ezidebit.com.au/"[Lit][]
  // !:TestFunctionResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetCustomerDetails - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeCustomerStatusResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:AddPayment      - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetCustomerDetailsResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:ChangeCustomerStatus - "https://px.ezidebit.com.au/"[Lit][]
  // !:AddCustomerResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:AddCustomer     - "https://px.ezidebit.com.au/"[Lit][]
  // !:EditCustomerDetailsResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:EditCustomerDetails - "https://px.ezidebit.com.au/"[Lit][]
  // !:AddPaymentResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentDetail - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentStatusResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentDetailPlusNextPaymentInfo - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentDetailResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetPaymentStatus - "https://px.ezidebit.com.au/"[Lit][]
  // !:DeletePaymentResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:DeletePayment   - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetScheduledPaymentsResponse - "https://px.ezidebit.com.au/"[Lit][]
  // !:GetScheduledPayments - "https://px.ezidebit.com.au/"[Lit][]

不回答這個問題,但也許有幫助:免費Pascal有一個Web服務工具包 ,它也有一個WSDL導入器。 該文件說,它也適用於德爾福。

“Web Service Toolkit”是FPC,Lazarus和Delphi的Web服務包;“Web Service Toolkit”旨在減輕FPC,Lazarus和Delphi用戶對Web服務的消費和創建。

http://wiki.freepascal.org/Web_Service_Toolkit





delphi-7