服务引用的命名空间错误

本文关键字:错误 命名空间 引用 服务 | 更新日期: 2023-09-27 18:35:07

我正在尝试在我的应用程序中使用 Qlikview API。我已经添加了服务参考并根据他们的说明进行了设置,但我收到一条警告消息,我认为该消息阻止我使用该参考。

消息说

ISerializable type with data contract name 'Exception' in namespace 'http://schemas.datacontract.org/2004/07/System' cannot be imported. The data contract namespace cannot be customized for ISerializable types and the generated namespace 'Tool.QMSAPIService' does not match the required CLR namespace 'System'. Check if the required namespace has been mapped to a different data contract namespace and consider mapping it explicitly using the namespaces collection. 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://ws.qliktech.com/QMS/11/']/wsdl:portType[@name='IQMS']
还有其他一些警告消息,

但我认为这可能是主要的警告消息,修复此问题将修复其他警告消息。

谁能给我一些关于寻找什么可能是导致此错误的想法?

服务引用的命名空间错误

看起来某些代码正在引发 System.Exception 类型的异常。 因此,该对象不可序列化,无法返回,这就是错误所说的。 问题可能是:

  • 他们那边的错误
  • 您提供给它们的输入存在问题。