c# - 带有警告和 InvalidOperationException 的 WCF WebService

标签 c# wcf magento asp.net-core

我目前正在尝试将我的 ASP-NET Core 2 应用程序连接到 Magento 的 API (WSDL v2),但不断收到以下错误:
*无论我调用哪种方法,即使是 new PortTypeClient().loginAsync(username, password); 也会抛出这个随机端点名称 salesOrderShipmentAddComment

InvalidOperationException: The operation 'salesOrderShipmentAddComment' could not be loaded because it specifies \"rpc-style\" in \"literal\" mode, but uses message contract types or the System.ServiceModel.Channels.Message. This combination is disallowed -- specify a different value for style or use parameters other than message contract types or System.ServiceModel.Channels.Message.

但是,使用 SoapUI、postman 或使用 framework 4.6 导入时,它工作得很好。 使用 Magento v1 API 它也可以工作,但我不想使用这个版本。

在 asp-net core 的导入过程中,我也收到了这些警告(导入 v1 没有显示任何警告): enter image description here

我几乎要创建一个新的 4.6 应用程序,单独托管它作为我的应用程序和 Magento 之间的桥梁,即使它会损害我的性能和架构。

这就是我进行导入的方式: enter image description here *Obs:在 Data Type Options 中,我还尝试检查不同的选项,并选择其他数据类型。

任何事情都会有帮助...
提前致谢

最佳答案

我遇到了同样的问题。确保将 Nuget 包更新到 4.5.3。之后,对我来说工作正常。

关于c# - 带有警告和 InvalidOperationException 的 WCF WebService,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51156944/

相关文章:

1.9.2.2 中的 Magento 静态 block 问题

php - Magento 只在一个网站上搜索速度慢

c# - Azure 数据表 - RowKey 作为 DateTime.Ticks 的正确用法?

c# - 如何删除对其他层中 Entity Framework 的引用

c# - 如何从不同线程编辑 Windows 窗体控件

wcf - 给定 wsdl,快速轻松地实现 WCF Web 服务?

.net - WCF 和 NetTcp 绑定(bind)

c# - 从操作过滤器属性重定向

c# - 为什么我的 WCF 数据服务无法提供自动生成的 ADO.Net EDM?

magento - 哪个 magento 表包含产品图像名称?