我们正在尝试在 .NET Core Web 应用程序中使用第三方的 SOAP API。我们尝试了 2 种方法来获取从他们提供给我们的 WSDL 文件生成的类。
在这两种情况下,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
我们如何解决这个问题?任何帮助将不胜感激!
一天半后,我发现我需要更新项目中的
System.ServiceModel
nuget 包。