ONVIF can not open某个文件时 解决方法

本文介绍使用wsdl2h工具处理ONVIF WSDL文件的过程,并解决因远程xsd文件引用导致的问题。通过修改文件中远程xsd引用为本地路径,成功生成了所需的onvif.h头文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



root@dtop:/home/openwrt/onvif-mips#wsdl2h -o onvif.h -c -s -t ./typemap.dat   ./onvif.xsd  ./devicemgmt.wsdl

Saving onvif.h

 

 

** The gSOAP WSDL/WADL/XSD processor for C and C++, wsdl2h release 2.8.43

** Copyright (C) 2000-2017 Robert van Engelen, Genivia Inc.

** All Rights Reserved. This product is provided "as is", withoutany warranty.

** The wsdl2h tool and its generated software are released under the GPL.

** ----------------------------------------------------------------------------

**  Acommercial use license is available from Genivia Inc., contact@genivia.com

** ----------------------------------------------------------------------------

 

Reading type definitions from type map"./typemap.dat"

Reading './onvif.xsd'...

 Connecting to 'http://docs.oasis-open.org/wsn/b-2.xsd' to retrieveschema... connected, receiving...

   Connecting to 'http://docs.oasis-open.org/wsrf/bf-2.xsd' to retrieveschema... connected, receiving...

   Done reading 'http://docs.oasis-open.org/wsrf/bf-2.xsd'

   Connecting to 'http://docs.oasis-open.org/wsn/t-1.xsd' to retrieveschema... connected, receiving...

   Done reading 'http://docs.oasis-open.org/wsn/t-1.xsd'

 Done reading 'http://docs.oasis-open.org/wsn/b-2.xsd'

Done reading './onvif.xsd'

Reading './devicemgmt.wsdl'...

 

Cannot open'../../../ver10/schema/onvif.xsd' to retrieve schema

 

解决方法:打开wsdl文件,将网络地址改为当前下载的后地址(即是你已经下载下来的文件,随便你放,但路径要对)

vi devicemgmt.wsdl

 

  <xs:schematargetNamespace="http://www.onvif.org/ver10/device/wsdl"xmlns:tt="http://www.onvif.org/ver10/schema"xmlns:tds="http://www.onvif.org/ver10/device/wsdl" elementFormDefault="qualified"version="16.06">

        <!--    <xs:importnamespace="http://www.onvif.org/ver10/schema"schemaLocation="../../../ver10/schema/onvif.xsd"/>-->

             <xs:importnamespace="http://www.onvif.org/ver10/schema"schemaLocation="./onvif.xsd"/>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值