Open ONVIF (Network Video Interface Forum) 기기에서 녹화 문제
저는 Open Network Video Interface Forum-Java 프로젝트에서 작업하고 있으며 ONVIF Application Programmer 's Guide에 설명 된 단계를 따릅니다 .
wsdls
ONVIF 사이트에 제공된 소스를 생성했습니다 . 을 사용하여 라이브 스트림 URI를 검색 할 수 media.wsdl
있습니다. 이제 녹음에 문제가 있습니다. 내가 시도한 코드는 다음과 같습니다.
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();
실행시 위 코드는 다음과 같은 오류를 제공합니다.
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Method 'ns11:GetServiceCapabilities' not implemented: method name or namespace not recognized
나는 또한 미디어 서비스를 시도했지만 오류는 다음과 같습니다.
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 405: Method Not Allowed
미디어 소스로 시도했을 때 서버가 오류 코드 405를 반환했기 때문에 권한이없는 작업을 요청한 것 같습니다. 방법을 사용할 수 없거나 방법을 사용하려면 자격 증명이 필요합니다.
의 Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Method 'ns11:GetServiceCapabilities' not implemented: method name or namespace not recognized
경우 @Sigismondo는 대부분의 IP 카메라가 지원하지 않는다는 사실에 대해 옳습니다. IP 카메라에서 녹화하려면 대체 녹화 방법 (문자 및 말장난)이 필요합니다.
당신이 사용하는 http://" + deviceip + "/onvif/media_service
녹음 서비스에 도달하지만, 이것은이다 media.wsdl 서비스를 제공합니다. 따라서 미디어 서비스에서 getRecordings를 호출하려고하면 오류가 발생하는 것이 정상으로 보입니다.
recording.wsdl 서비스 의 URL은 http://" + deviceip + "/onvif/recording_service
.
녹화 서비스에 도달하기위한 corect URL을 얻으려면 devicemgmt.wsdl 서비스 의 GetCapabilities 메소드에서 요청해야 합니다.
HTTP 405-허용되지 않는 리소스는 일반적으로 IIS에서 발생합니다. 이 문제는 다음 조건에 해당하는 경우 발생합니다.
You do not specify the file name. For example, you do not specify http ://Server/Web/...
The Scripting Object Model (SOM) is enabled.
- A DTC event is called.
So, when the SOM is enabled a < form > tag is inserted in the page the tag is invalid means it does not contain any action.
'developer tip' 카테고리의 다른 글
가장 유용한 R 트릭은 무엇입니까? (0) | 2020.09.08 |
---|---|
Graphviz를 사용할 때 가장자리에 맞춰 레이블 표시 (0) | 2020.09.08 |
jQuery Fullcalendar에 리소스보기 / Gannt 차트 추가 (0) | 2020.09.08 |
마이크로 서비스 및 데이터베이스 조인 (0) | 2020.09.08 |
분산 트랜잭션을 시작할 수 없습니다. (0) | 2020.09.08 |