Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with recording from the Open ONVIF (Network Video Interface Forum ) device

I'm working on Open Network Video Interface Forum-Java project and following the steps described in the ONVIF Application Programmer's Guide.

I have generated sources from the wsdls provided in ONVIF site. I'm able to retrieve the live stream URI using the media.wsdl. Now I have an issue with recording. The codes that I have tried is given below:

RecordingService recording_ervice = new RecordingService(); RecordingPort record_port = recording_ervice.getRecordingPort();   BindingProvider bindingProvider = (BindingProvider) record_port;  // Add a security handler for the credentials final Binding binding = bindingProvider.getBinding(); List<Handler> handlerList = binding.getHandlerChain(); if (handlerList == null) {     handlerList = new ArrayList<Handler>(); }  handlerList.add(new RecordStream.SecurityHandler()); // binding.setHandlerChain(handlerList);  // Set the actual web services address instead of the mock service Map<String, Object> requestContext = bindingProvider.getRequestContext();  requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + deviceip + "/onvif/media_service"); requestContext.put(BindingProvider.USERNAME_PROPERTY, user); requestContext.put(BindingProvider.PASSWORD_PROPERTY, pass);  Recordings recordings = record_port.getRecordings(); 

The above code on run gives an error as:

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Method 'ns11:GetServiceCapabilities' not implemented: method name or namespace not recognized 

I also tried with media service, then the error is:

Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 405: Method Not Allowed 
like image 317
Neenu Avatar asked Jan 08 '14 03:01

Neenu


People also ask

What is an ONVIF device?

What is ONVIF? The surveillance industry has created an open standard protocol called ONVIF that allows cameras to communicate with each other and with network recording devices. ONVIF has different versions of compatibility that dictate which features can be integrated into the system.

Is ONVIF secure?

A critical security vulnerability has been discovered for multiple ONVIF-based devices that allow attackers to gain root access to those devices without proper authentication. A critical vulnerability (CVE-2017-9765) called “Devil's Ivy” could affect a large number of ONVIF-based devices from multiple manufacturers.

What is ONVIF standard?

ONVIF creates a standard for how IP products within video surveillance and other physical security areas can communicate with each other. ONVIF is an organization started in 2008 by Axis Communications, Bosch Security Systems and Sony. Open Network Video Interface Forum. Abbreviation. ONVIF.


1 Answers

When you tried with the media source, you requested an unauthorized action apparently since the server returned Error code 405. Either the method is prohibited from use, or you need a credential to use the method.

As for Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Method 'ns11:GetServiceCapabilities' not implemented: method name or namespace not recognized, @Sigismondo is right about the fact that most ip cameras don't support it. You will need an alternative recording method(literal and pun) to record from an ip camera.

like image 151
AMDG Avatar answered Oct 04 '22 03:10

AMDG