Delphi 7 Soap WCF Service using basicHttpBinding

蓝咒 提交于 2019-12-11 04:35:07

问题


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


回答1:


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



回答2:


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



来源:https://stackoverflow.com/questions/3661603/delphi-7-soap-wcf-service-using-basichttpbinding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!