“找不到入口点”使用从 WSDL 文件生成的类时出错

问题描述 投票:0回答:1

我们正在尝试在 .NET Core Web 应用程序中使用第三方的 SOAP API。我们尝试了 2 种方法来获取从他们提供给我们的 WSDL 文件生成的类。

  1. 在 Visual Studio 中使用 WCF
  2. 按照“简短答案”中的建议直接使用 svcutil 此处

在这两种情况下,Visual Studio 都会识别这些类,提供预期的智能感知并成功构建解决方案。我们还添加了

System.ServiceModel.Primitives
nuget,如#2 中的链接中所建议。

但是,当我们尝试调用客户端上的任何方法时,我们会收到错误“找不到入口点”。

var binding = new BasicHttpsBinding(BasicHttpsSecurityMode.Transport);
var address = new EndpointAddress("{SOAP Endpoint Address}");
var client = new ItemDefinitionServiceEndpointClient(binding, address);

var response = await client.findAllAsync(); // This throws the 'Entry point was not found' error

我们如何解决这个问题?任何帮助将不胜感激!

c# wcf soap wsdl svcutil.exe
1个回答
0
投票

一天半后,我发现我需要更新项目中的

System.ServiceModel
nuget 包。

© www.soinside.com 2019 - 2024. All rights reserved.