【发布时间】:2012-12-30 21:05:54
【问题描述】:
我有一个 WSDL 网址: http://www.persiansms.info/webservice/smsService.php?wsdl
当我尝试使用 Delphi WSDL Importer 生成接口时,Delphi 会生成以下警告:
// ************************************************************************ //
// 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.
// ************************************************************************ //
// !:int - "http://www.w3.org/2001/XMLSchema"[]
// !:ArrayOf_xsd_long - "http://www.w3.org/2001/XMLSchema"[]
// !:string - "http://www.w3.org/2001/XMLSchema"[]
// !:array - "http://www.w3.org/2001/XMLSchema"[]
那么,数组是什么? WSDL 文档从未提及它的类型,例如:
<part name="note" type="xsd:array"/>
我很困惑,这是delphi中的错误吗?还是 WSDL 文档不完整? 一个 C# 程序可以很好地使用它,但我没有源代码。
那我该怎么办? 有没有可能找出那是什么?
【问题讨论】:
-
看起来你在下面得到了答案。我之所以问 Delphi 的哪个版本是因为五六年前我发现 D7 的 WSDL 导入器在特定站点上生成的代码有问题。我确认了这些错误是特定于 D7 的,并且当时在 Embarcadero 负责代码的人提供了一些帮助,但我没有记录问题是什么或与谁一起工作。如果您遇到问题,虽然我知道这会很痛苦,但您可能需要看看是否可以在其中的某些部分使用更现代的 Delphi 版本,也许在 DLL 中?抱歉,我无法提供更多帮助。
标签: web-services delphi wsdl delphi-7 soap-client