将 WSDL 导入 Delphi 7 时出现堆栈溢出错误
我正在尝试使用 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
然后一遍又一遍地循环最后两行。显然,这显示了一个错误,但没有进一步详细说明该错误可能是什么。
我已经在 Microsoft Visual Studio 中创建了一个 C# 项目,并将其添加为 Web 参考,没有任何问题,但由于遗留代码,我也需要将其添加到 Delphi 7 中。
WSDL 的地址是
https://api.demo.ezidebit.com .au/v3-3/nonpci?wsdl
我也尝试使用soapUI加载它,没有任何错误。
编辑 我已经下载了 Delphi XE2 的试用版(在另一个问题中提到作为可能的解决方案),它在我的 PAS 文件顶部提供了以下内容。 (如果需要,我可以上传整个代码)
我假设 Delphi 不喜欢的 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][]
I am trying to import a WSDL into Delphi 7 using the WSDLImporter (as well as the WSDLImp command line).
When using the WSDLImporter, the memory usage of Delphi just starts increasing until it crashes (no error) or I get a Stack overflow error.
When using the command line tool I get the following
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
This then loops through the last 2 lines over and over again. Obviously this shows an error but there are no further details on what that error maybe.
I have created a C# project in Microsoft Visual Studio and added this as a web reference without any issues but I need to have it in Delphi 7 also due to legacy code.
The address for the WSDL is
https://api.demo.ezidebit.com.au/v3-3/nonpci?wsdl
I have also tried to load this using soapUI without any errors.
EDIT
I have downloaded the trial version of Delphi XE2 (mentioned in another question as a possible solution) and it has given me the following at the top of my PAS file. (I can upload the entire code if necessary)
I'm assuming that there is a problem with the WSDL file that Delphi doesn't like. Any clues on what I can ask the WSDL developer to change so that it will import?
// ************************************************************************ //
// 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][]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有回答问题,但可能有帮助:Free Pascal 有一个 Web 服务工具包,它也有一个 WSDL 导入器。文档说它也适用于 Delphi。
http://wiki.freepascal.org/Web_Service_Toolkit
Not answering the question but maybe helpful: Free Pascal has a Web Service Toolkit which also has an WSDL importer. The documentation says it works with Delphi too.
http://wiki.freepascal.org/Web_Service_Toolkit