带有服务引用的命名空间错误

时间:2014-12-22 10:52:20

标签: c# service-reference qlikview

我正在尝试在我的应用程序中使用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']

还有其他几条警告信息,但我认为这可能是主要信息,修复此问题将会解决其他问题。

任何人都可以给我一些关于寻找可能导致此错误的原因的想法吗?

1 个答案:

答案 0 :(得分:0)

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

  • 最终的错误
  • 您提供的输入存在问题。