使用 basicHttpBinding 的 Delphi 7 Soap WCF 服务

发布于 2024-09-18 01:44:51 字数 910 浏览 4 评论 0 原文

我将 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 文档。没有区别。

谢谢, 大卫

I added a basicHttpBinding to an existing Service I have in production in order to expose it for use in Delphi.

When I try to use the WSDLImporter from Delphi 7 on the wsdl file, it doesn't work right.

A section in the resulting tlb says

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

This service is consumed fine by .NET client. The service is using complexTypes but they are in the files and they are the newer split out to multiple files for imports by xsd.

Any way of doing this in Delphi 7? I even tried pulling all imported types back to 1 wsdl document. No difference.

Thanks,
David

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

做个少女永远怀春 2024-09-25 01:45:00

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

对于 Delphi 7,您可以尝试 这个问题

——杰罗恩

First guess is that the WCF service is SOAP 1.2, for which support was added in Delphi 2010.

For Delphi 7, you could try some of the answers to this question.

--jeroen

眼前雾蒙蒙 2024-09-25 01:44:58

我知道这很旧(非常),但它可能会帮助其他人解决这个问题,就像我们使用 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

I know this is old (very) but it might help someone else out struggling through this like we were with WCF interoperability with Delphi.

What made the difference in my own experience was

  1. using basicHttpBinding
  2. using the Delphi wsdlImp command line tool
  3. enforcing Soap 1.1
  4. pointing to the SingleWsdl address.

Here is an what our WsdlImp command looks like:

wsdlimp  -P -XName -Ox- -SOAP11 -Oa- -Ol+ -ob+ -= http://srvAddress:1253/WCF.Server/Utils.svc/metadata?singleWsdl=UtilsWsdl.pas
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文