ONVIF : How to form the device web service address from the IP address of an NVT
Asked Answered
A

5

6

My question is about the ONVIF specification. http://www.onvif.org/imwp/download.asp?ContentID=18006 In section 5.10, it says :

A service is a collection of related ports. This specification does not mandate any service naming principles.

Lets say that I have the IP address of an NVT (Network Video Transmitter like an IP camera for example), how do I form the address of the device management web service? This service is the entry point of the whole system.

Thank you.

Allx answered 29/8, 2010 at 22:24 Comment(0)
G
6

According to the official document (section 5.1.1), you can access the service at http://<IP address>/onvif/device_service

Grecize answered 4/1, 2011 at 11:12 Comment(0)
L
2

you have to add service in onvif xsdl file ( lets say http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl )

    <wsdl:definitions ......>
      ..............
         </wsdl:binding>
         <!--===============================-->
         <wsdl:service name="DeviceService">
             <wsdl:port name="DevicePort" binding="tds:DeviceBinding">
               <soap:address location="http://ip/onvif/device_service"/>
             </wsdl:port>
           </wsdl:service>
    </wsdl:definitions>

and generate ws client source code ( for java can use wsimport )

As was mentioned the entry point for webservice is http://ip/onvif/device_service

Letrice answered 13/1, 2011 at 16:0 Comment(0)
J
0

The convention pointed by Şafak is described in ONVIF standard. But in real life some devices does not follow it. In this case you try send unicast ws-discovery Probe request (or multicast and then filter ProbeMatch replies by ip-address), XAddrs field in ProbeMatch reply will contain the required address for device service.

Jock answered 1/3, 2011 at 13:39 Comment(0)
L
0

Just be aware to use everywhere the *http://IP/onvif/device_service* url for reaching the services. According to GetServices request:

<env:Body>
        <tds:GetServicesResponse>
            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver10/device/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/device_service</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver10/media/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/Media</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver10/events/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/Events</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver20/ptz/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/PTZ</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver20/imaging/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/Imaging</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver10/deviceIO/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/DeviceIO</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>

            <tds:Service>
                <tds:Namespace>http://www.onvif.org/ver20/analytics/wsdl</tds:Namespace>
                <tds:XAddr>http://IP/onvif/Analytics</tds:XAddr>
                <tds:Version>
                    <tt:Major>2</tt:Major>
                    <tt:Minor>10</tt:Minor>
                </tds:Version>
            </tds:Service>
        </tds:GetServicesResponse>

    </env:Body>

You can have different services on different urls. This has been seen on one of the HikVision cameras. Most of them uses the *http://IP/onvif/device_service*.

Lohr answered 21/7, 2014 at 14:7 Comment(0)
L
0

Actually via the WS-Discovery you could only get address of device service. The addresses of the other services you must get with DeviceService:GetServices request which works 100% with address you got before with WS-Discovery.

Lohr answered 15/8, 2014 at 18:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.