I'm trying to set up the events, using ONVIF library. Basic idea is to subscribe to a camera. Once you have subscribed, you can now receive events (eg: motion detection). Later when you don't want to receive any events anymore, you can just unsubscribe. This is the code that I have so far:
Service eventService = Service.create(
new File("<location>\\wsdl\\event.wsdl").toURI().toURL(),
new QName("http://www.onvif.org/ver10/events/wsdl", "PullPointSubscriptionBinding"));
PullPointSubscription subscription = eventService.getPort(PullPointSubscription.class);
BindingProvider eventProvider = (BindingProvider) subscription;
eventProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://<ip>:888/onvif/events_service");
I'm using Foscam9821 Camera. Does anyone know how to implement the subscription and receiving events? I'm using JAVA. Any help is much appreciated!