问题
I have the IP address of an ONVIF supported IP camera,how do I form the address of the DeviceIO web service?
回答1:
A robust way to do it is the following:
- Probe the camera, by using the WS-Discovery
- Extract the field
XAddrfrom theProbeMatch. Usually it ishttp://<ip_addr>/onvif/device_service, but it is not guaranteed always to be like this. - Verify if your camera supports
GetCapabilitiesor it has the newGetServices. - Either from
GetCapabilitiesRepsonseorGetServicesResponseverify if your device supports the Device I/O service and get the correspondingXAddr.
Beware that the initial handshake may be tricky, because if the camera only supports UsernameToken for authtentication, you'll need to syncronize your client with the device's clock. Have a look at the ONVIF Application Programmer's Guide for further details.
来源:https://stackoverflow.com/questions/47427595/onvif-how-to-form-the-deviceio-web-service-address-from-the-ip-address-of-an-o