GetCurrentDeviceStatus SOAP request isssue with one Management Service and two Recording Server ?

Hi Milestone,

I’m developing a feature to periodically check camera status.

I setup Milestone in two servers as picture below. One Management Server and two Recording Server.

One master server (10.179.78.211) setup : Management Server, Recording Server (10 cameras), Mobile Server, API gateway and another (10.179.78.212) : Recording Server (9 cameras), Mobile Server, API gateway.

I use SOAP service : http://10.179.78.211/ServerAPI/ServerCommandService.asmx?WSDL

to login and get token , then use GetCurrentDeviceStatus from http://10.179.78.211:7563/recorderstatusservice/recorderstatusservice2.asmx?wsdl with guid cameras.

The problem here is that I can only get status of 10 cameras in same Management Server and Recoding Server, and get null with 9 cameras in another server.

=========================================

SOAP REQUEST payload:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”>

<SOAP-ENV:Header />

SOAP-ENV:Body

<ns2:GetCurrentDeviceStatus xmlns:ns2=“http://videoos.net/2/XProtectCSRecorderStatus2”>

ns2:tokenTOKEN#97e6d11c-83d1-4d5a-9878-080eb0fd581d#10.179.78.211//ServerConnector#</ns2:token>

ns2:deviceIds

ns2:guid79d85469-4b3f-4f70-97be-78db18e35d16</ns2:guid>

ns2:guid4a7f1bfa-7b7a-4a98-af72-2944262f020d</ns2:guid>

ns2:guida6b33cb7-6580-4de9-a188-9fb168c2ca7e</ns2:guid>

ns2:guid2c25ebdf-0340-4260-8070-243ccc001921</ns2:guid>

</ns2:deviceIds>

</ns2:GetCurrentDeviceStatus>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

===============

SOAP RESPONSE payload:

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>

soap:Body

<GetCurrentDeviceStatusResponse xmlns=“http://videoos.net/2/XProtectCSRecorderStatus2”>

2023-09-21T09:20:26.7334800Z

4a7f1bfa-7b7a-4a98-af72-2944262f020d

false

true

true

false

false

false

true

false

false

false

false

true

2023-09-21T09:20:26.7334800Z

a6b33cb7-6580-4de9-a188-9fb168c2ca7e

false

true

true

false

false

false

true

false

false

false

false

true

</soap:Body>

</soap:Envelope>

Only guid cameras : 4a7f1bfa-7b7a-4a98-af72-2944262f020d, a6b33cb7-6580-4de9-a188-9fb168c2ca7e from Recording Server same with Management Server return result.

Please help me.

Tks

The RecorderStatusService is on the recording server, you should never use the URI of the Management Server to contact it. When you get the configuration from the Management Server each camera will include information about the Recording Server URI, this is what you need to use instead.

In a large installation you would typically have one server with the Management Server service but no Recording Server, and then have up to hundreds of Recording Servers.

In your example there is a RecorderStatusService at 10.179.78.211 and 10.179.78.212 (basically everywhere there is a Recording Server).

Hi Bo Ellegård Andersen,

But before I use RecorderStatusService on the recording server 10.179.78.212, I need login to get token, but Login Service is only in the Management Server. Can I get token without Management Server ? I get token from Management Server 10.179.78.211 and get info from RecorderStatusService on the recording server 10.179.78.212 but I can’t authorize.

You are correct.

You get the token on the Management Server then you use that token when you communicate with the Recording Servers. You also need the configuration from the Management Server because that gives you the addresses of the Recording Servers.

So it is two steps, get token and configuration from Management Server, then use the information to communicate with and get status from each of the Recording Servers.

Tks Bo Ellegård Andersen, I will try with this flow