eyetowers / gonvif

Onvif Go client library and CLI tool.
MIT License
9 stars 3 forks source link

An error occurred during the execution of `SetSystemDateAndTime`. #6

Closed Kerblif closed 1 week ago

Kerblif commented 3 weeks ago

I cannot set the Manual time on the camera via SetSystemDateAndTime, the camera requires stricter attribution.

Here is the request that should be sent (without header) ``` POST /onvif/device_service HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver10/device/wsdl/SetSystemDateAndTime" Host: 10.100.100.100:8899 Content-Length: 1327 Accept-Encoding: gzip, deflate Connection: Close Manual false PST8PDT 2024 7 4 HTTP/1.1 200 OK Server: gSOAP/2.7 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 3259 Connection: close ```
Here's what the library is sending now (without header) ``` POST /onvif/device_service HTTP/1.1 Host: 10.100.100.100:8899 User-Agent: gowsdl/0.1 Connection: close Content-Length: 1115 Content-Type: application/soap+xml; charset="utf-8" Accept-Encoding: gzip Manual GMT 2024 7 4 HTTP/1.1 400 Bad Request Server: gSOAP/2.7 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 3106 Connection: close SOAP-ENV:Sender Validation constraint violation: tag name or namespace mismatch in element 'UTCDateTime' ```
osery commented 2 weeks ago

Can you try with PR: https://github.com/eyetowers/gonvif/pull/7?

Kerblif commented 1 week ago

@osery, thanks, everything works perfectly!