I would like to be able to move the camera from a remote Java app,
so I am issuing commands to SOAP endpoints from RecorderCommandService in RecordingService.
Issuing PTZMoveHome moves the camera.
------------------------------------------------------------------------------------------------------------------------
POST http://redacted:7563/recordercommandservice/recordercommandservice.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action=“http://videoos.net/2/XProtectCSRecorderCommand/PTZMoveHome”
Content-Length: 434
Host: redacted:7563
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/16.0.2)
<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xpr=“http://videoos.net/2/XProtectCSRecorderCommand”>
<xpr:token>redacted</xpr:token>
<xpr:deviceId>redacted</xpr:deviceId>
</xpr:PTZMoveHome>
</soap:Body>
</soap:Envelope>
------------------------------------------------------------
HTTP/1.1 200 OK
Server: XProtect Recording Server 23.3a
Date: Fri, 26 Apr 2024 21:59:49 GMT
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 354
<?xml version="1.0" encoding="utf-8"?>------------------------------------------------------------------------------------------------------------------------
And so does PTZCenter
------------------------------------------------------------------------------------------------------------------------
POST http://redacted:7563/recordercommandservice/recordercommandservice.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action=“http://videoos.net/2/XProtectCSRecorderCommand/PTZCenter”
Content-Length: 650
Host: redacted:7563
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/16.0.2)
<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xpr=“http://videoos.net/2/XProtectCSRecorderCommand”>
<xpr:token>TOKEN#8a619bee-a179-4b46-abdf-ff7dcfceddda#win-2vdcb5rupgo//ServerConnector#</xpr:token>
<xpr:deviceId>53d8c78b-8456-49df-9f5a-939db7e2988b</xpr:deviceId>
<xpr:refWidth>100</xpr:refWidth>
<xpr:refHeight>100</xpr:refHeight>
<xpr:centerX>50</xpr:centerX>
<xpr:centerY>50</xpr:centerY>
<xpr:zoom>0.5</xpr:zoom>
</xpr:PTZCenter>
</soap:Body>
</soap:Envelope>
------------------------------------------------------------
HTTP/1.1 200 OK
Server: XProtect Recording Server 23.3a
Date: Fri, 26 Apr 2024 22:01:59 GMT
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 350
<?xml version="1.0" encoding="utf-8"?>------------------------------------------------------------------------------------------------------------------------
PTZMoveStart does nothing. RecordingServer returns 200 OK, but the camera does not move.
------------------------------------------------------------------------------------------------------------------------
POST http://redacted:7563/recordercommandservice/recordercommandservice.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action=“http://videoos.net/2/XProtectCSRecorderCommand/PTZMoveStart”
Content-Length: 815
Host: redacted:7563
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.5 (Java/16.0.2)
<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xpr=“http://videoos.net/2/XProtectCSRecorderCommand”>
<xpr:token>redacted</xpr:token>
<xpr:deviceId>redacted</xpr:deviceId>
<xpr:ptzArgs>
<xpr:movement>
<xpr:name>zoom</xpr:name>
<xpr:value>0.1</xpr:value>
</xpr:movement>
<xpr:speed>
<xpr:name>zoom</xpr:name>
<xpr:value>0.5</xpr:value>
</xpr:speed>
<xpr:Normalized>false</xpr:Normalized>
</xpr:ptzArgs>
</xpr:PTZMoveStart>
</soap:Body>
</soap:Envelope>
------------------------------------------------------------
HTTP/1.1 200 OK
Server: XProtect Recording Server 23.3a
Date: Fri, 26 Apr 2024 22:04:31 GMT
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 356
<?xml version="1.0" encoding="utf-8"?>------------------------------------------------------------------------------------------------------------------------
PTZRectangle, PTZMoveAbsolute, and PTZRelative behave same as PTZMoveStart - 200 OK - but no effect on the camera position.
I tried to pan and titlt, so this is not a zoom-specific issue.
I tried various values to make sure that the camera is not already in the requested position.
I tried to send values that should have resulted in an error, but got 200 OK.
I tried SOAP 1.1 and SOAP 1.2.
I tried to play with XML namespaces.
Nothing helps.
The user I am authenticated as has “Administrator” role, so I believe it has authorization to move the camera.
When I make those request, that do not result in camera movement,
I can see in Milestone XProtect Smart Client that a session has been created for those requests, because Smart Client, temporarily, refuses to move the camera, and I can see my username in the error message.
I would like for the SOAP commands that do not result in camera movement to move the camera. What could I be doing wrong?
Milestone XProtect Smart Client has no problem with moving the camera. Is it calling something else?
I am not too attached to calling those SOAP endpoints, so I am happy to explore other solutions to moving the camera that could be accomplished in a remote Java app.
If you would like me to attach some logs from a specific file, please let me know.
Thanks.