2

我在生产中的现有服务中添加了一个 basicHttpBinding,以便公开它以在 Delphi 中使用。

当我尝试在 wsdl 文件上使用 Delphi 7 中的 WSDLImporter 时,它无法正常工作。

结果 tlb 中的一个部分说

// ************************************************************************ //
// 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.
// ************************************************************************ //

.NET 客户端可以很好地使用此服务。该服务正在使用 complexTypes,但它们在文件中,并且它们是较新的拆分为多个文件以供 xsd 导入。

在 Delphi 7 中有什么方法可以做到这一点?我什至尝试将所有导入的类型拉回 1 个 wsdl 文档。没有不同。

谢谢,大卫

4

2 回答 2

0

第一个猜测是 WCF 服务是 SOAP 1.2,在 Delphi 2010 中添加了对它的支持。

对于 Delphi 7,您可以尝试对这个问题的一些答案。

——杰伦

于 2010-09-08T03:59:42.620 回答
0

我知道这很旧(非常),但它可能会帮助其他人摆脱困境,就像我们使用 WCF 与 Delphi 的互操作性一样。

使我自己的经历有所不同的是

  1. 使用基本HttpBinding
  2. 使用 Delphi wsdlImp 命令行工具
  3. 执行肥皂 1.1
  4. 指向 SingleWsdl 地址。

这是我们的 WsdlImp 命令的样子:

wsdlimp  -P -XName -Ox- -SOAP11 -Oa- -Ol+ -ob+ -= http://srvAddress:1253/WCF.Server/Utils.svc/metadata?singleWsdl=UtilsWsdl.pas
于 2013-09-26T09:10:37.097 回答