AlarmService2 C++ Error

I’m trying to get alarms with AlarmService2. I’m using C++ Builder with THTTPRIO object and XProtect 2020 R3. When I use the function “GetAlarmLines”, I have the next error: Se restableció la conexión con el servidor - URL:http://LOCALHOST:22331/Central/AlarmService2?wsdl - SOAPAction:http://videoos.net/2/CentralServerAlarmCommand/IAlarmCommand/GetAlarmLines. Could you help me?

could you try with “http://localhost:22331/Central/AlarmService2?singleWsdl” , you can check with SoapUI it should consume service and show u contracts.

I got the next answer from SoapUI:

Have u passed token to api call u wanted to get result?

Here is example of getting token and then passing to method to get results.

Note: basic user has to be added to administrator group.

https://localhost/ManagementServer/ServerCommandService.svc

and in soap request

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xpr=“http://videoos.net/2/XProtectCSServerCommand”>

soapenv:Header/

soapenv:Body

xpr:Login

xpr:instanceIdDDF4BA55-808E-479F-BE8B-72F69913442F</xpr:instanceId>

</xpr:Login>

</soapenv:Body>

</soapenv:Envelope>

u will get token.

With token

http://localhost:22331/Central/AlarmServiceToken?singleWsdl

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:cen=“http://videoos.net/2/CentralServerAlarmCommand” xmlns:vid=“http://schemas.datacontract.org/2004/07/VideoOS.Platform.Proxy.Alarm”>

soapenv:Header/

soapenv:Body

 <cen:GetAlarmLines>

    <!--Optional:-->

    <cen:token>{replace and put token without brackets}</cen:token>

    <!--Optional:-->

    <cen:from>0</cen:from>

    <!--Optional:-->

    <cen:maxCount>10</cen:maxCount>

    <!--Optional:-->

    <cen:filter>

    </cen:filter>

 </cen:GetAlarmLines>

</soapenv:Body>

</soapenv:Envelope>