c# - 新的 onvif 事件 wsdl 仍未修复?

标签 c# wsdl svcutil.exe onvif

要从符合 ONVIF 标准的设备检索事件,您需要使用 ONVIF 事件 wsdl。

ONVIF FAQ & Support page 中提到了以下内容:

Visual Studio 2008, 2010 and 2012 generate web services clients for the WCF framework with a tool called svcutil.exe. This tool has an issue by mapping port types to interfaces and complex types to classes. When an wsdl file contains a port type and complex type with same name this results in a name clash at compile time like "The namespace 'foo.Event' already contains a definition for 'CreatePullPoint' ".

作为解决方法,他们编辑了 events.wsdl 以使用修改后的 ws 基本通知文件,该文件可通过 this 获得。链接。

但是,当我将 wsdl 文件添加到我的解决方案中时,出现错误,指出找不到 wsdl 文件中的以下行中提到的文件

<wsdl:import namespace="http://docs.oasis-open.org/wsn/bw-2" location="bw-2-vs-mod.wsdl"/>  <!-- Use modified OASIS file to avoid svcutil name clash -->

当我浏览到 http://docs.oasis-open.org/wsn/ 时并手动查找该文件,我可以看到它也没有在那里列出。该文件是否还有其他位置?

最佳答案

提供的 WSDL 链接 here不正确并且缺少一个字符。正确的网址是http://www.onvif.org/onvif/ver10/events/wsdl/event-vs.wsdl 。使用此 URL 为我解决了命名空间错误。

关于c# - 新的 onvif 事件 wsdl 仍未修复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29764619/

相关文章:

c# - XML 缩进未按预期工作

c# - 为什么在实例化之前将对象实例化为null是错误的?

java - 使用 jax-ws 的 soap 请求中缺少前缀

soap - 手卷 SOAP 请求

c# - WCF - 读取 XML 数据时已超出最大可命名字符数配额 (16384)

c# - 使用组合框中选定的文本更改 SQL 查询

c# - Entity Framework IDatabaseInitializer 重新创建 DbContext 的表

java - 获取 CXF 错误 : javax. xml.ws.WebServiceException:WSDL 元数据无法用于创建代理

wcf - 使用 svcutil 为客户端代理生成 xsd 文件

wcf - svcutil、WSDL 和生成的接口(interface)不足以实现