I need to discover all ip cameras in local area network that supports onvif protocol. I tried with WSDiscoveryClient, but it doesnt discover onvif services, although it discovers other services. Its like onvif doesnt responde to probe from WSDiscoveryClient. Onvif device manager can do the discovery, so I know it is possible to do it. Does anyone know how to do it?
Asked
Active
Viewed 7,903 times
1
-
The normal approach would be to listen to a known IP, look what is relayed back., maybe snoop out the protocol. – Joop Eggen Mar 19 '15 at 15:54
-
possible duplicate of [ONVIF - beginning of Device discovery](http://stackoverflow.com/questions/20535199/onvif-beginning-of-device-discovery) – mpromonet May 31 '15 at 21:37
2 Answers
5
This document: http://www.onvif.org/Portals/0/documents/WhitePapers/ONVIF_WG-APG-Application_Programmer%27s_Guide.pdf
Shows an example of what is required to send(via UDP broadcast)in order to discover ONVIF devices
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:e="http://www.w3.org/2003/05/soap-envelope"
xmlns:w="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:d="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:dn="http://www.onvif.org/ver10/network/wsdl">
<e:Header>
<w:MessageID>uuid:84ede3de-7dec-11d0-c360-f01234567890</w:MessageID>
<w:To e:mustUnderstand="true">urn:schemas-xmlsoap-org:ws:2005:04:discovery</w:To>
<w:Action a:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe</w:Action>
</e:Header>
<e:Body>
<d:Probe>
<d:Types>dn:NetworkVideoTransmitter</d:Types>
</d:Probe>
</e:Body>
</e:Envelope>

ChrisWard1000
- 526
- 5
- 15
-
Thx man, can u give some java code example of how to send soap message based on this xml to udp broadcast? – Aleksa Mar 21 '15 at 19:27
-
1I haven't coded much in Java, but this looks like a good example on how to send a udp broadcast: http://michieldemey.be/blog/network-discovery-using-udp-broadcast/ – ChrisWard1000 Mar 21 '15 at 23:48