使用 basicHttpBinding 的 Delphi 7 Soap WCF 服务

标签 delphi wsdl wcf delphi-7 basichttpbinding

我将 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 客户端可以很好地使用此服务。该服务正在使用复杂类型,但它们位于文件中,并且它们是较新的拆分为多个文件以供 xsd 导入的文件。

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

谢谢, 大卫

最佳答案

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

我自己的经历产生了不同的是

  1. 使用 basicHttpBinding
  2. 使用 Delphi wsdlImp 命令行工具
  3. 强制执行 Soap 1.1
  4. 指向 SingleWsdl 地址。

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

wsdlimp  -P -XName -Ox- -SOAP11 -Oa- -Ol+ -ob+ -= http://srvAddress:1253/WCF.Server/Utils.svc/metadata?singleWsdl=UtilsWsdl.pas

关于使用 basicHttpBinding 的 Delphi 7 Soap WCF 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3661603/

相关文章:

delphi - 检测在另一个进程中按下的键

java - 身份验证 Spring SOAP 到 Workday

python - Spyne/RPClib - 如何响应 ComplexModel?

c# - 通过 ANDROID APP 使用本地托管的 SOAP 服务

wcf - IIS Express 错误 http 404.17 – 未发现正在运行 WCF 服务

wcf - Restfull WCF Web 服务的 WebDav 问题

delphi - 为什么 Delphi 2009 不为太长的字符串常量提供消息?

delphi - 使用 F1 键无法打开帮助文件以获取正确的上下文

Delphi - 如何检查列表框是否包含指定的字符串?

ANT Gradle - Axis WSDL 2 Java : No such property: axis for class: org. gradle.api.internal