I'm going to use Apache CXF for ONVIF-compatible ip camera service. It uses WS-Discovery to find devices and services and cxf supports it out-of-box:
The cxf-services-ws-discovery-service jar will register a ServerLifecyleListener that will automatically publish the "Hello" messages. It will also respond to any Probe requests that match the services it has published.
How will cxf detect device type to send in ProbeMatches
response? How can i specify that my device is ip camera (i need to set concrete device type in ProbeMatches response, NetworkVideoTransmitter
for example)?
After looking into CXF source code (
WSDiscoveryServiceImpl
class) i've found the answer:In brief - it iterates published services and compares QNames. If searched qname is found in published it's added into
ProbeMatch
. So i should implement and publish service with needed QName to fix it.