Do you have some tips for SOAP debugging in the protocol integration?

I am trying to create an alarm from python, I got ErrorReason Unknown, is it possible to look up some logs to get a more precise message?

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
 
<s:Body>
 
<s:Fault>
 
<faultcode>s:Client</faultcode>
 
<faultstring>Unhandled exception: System.ArgumentException: Invalid alarm&#13;
 
at VideoOS.Event.Server.Event.RuleEngine.ProcessAlarm(Alarm alarm)&#13;
 
at VideoOS.Event.Server.WebService.Alarm.AlarmCommandToken.Add(String token, Alarm alarm)</faultstring>
 
<detail>
 
<AlarmServiceFault xmlns="http://schemas.datacontract.org/2004/07/VideoOS.Platform.Proxy.Alarm" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
 
<ErrorDescription>Unhandled exception: System.ArgumentException: Invalid alarm&#13;
 
at VideoOS.Event.Server.Event.RuleEngine.ProcessAlarm(Alarm alarm)&#13;
 
at VideoOS.Event.Server.WebService.Alarm.AlarmCommandToken.Add(String token, Alarm alarm)</ErrorDescription>
 
<ErrorReason>Unknown</ErrorReason>
 
</AlarmServiceFault>
 
</detail>
 
</s:Fault>
 
</s:Body>
 
</s:Envelope>

You will be able to look Event server logs here -

[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs

Event Server MIP logs are located here:

[C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Event Server\logs\MIPLogs\ and are named in the following manner: MIP[YYYY-MM-DD].log, according to the date.

For example: MIP2018-03-06.log.

@Rie Kiuchi (Milestone Systems)​ thanks.

Another question about SOAP navigation.

How do I discover, understand what each field signifies in SOAP requests.

If I take the `Add` method from AlarmService there are 320 lines of XML, most of the parameters are optional, many of them are intuitive, but still, a big chunk is difficult to grasp without broader knowledge of other services.

I think I am missing some doc that explains everything.

Are there any detailed docs about the objects in the SOAP interface?

Example:

So I want to create an alarm and link it with a camera. I only know a camera Id other information I should request programmatically.

When I generate an alarm from the chosen camera I can retrieve the FQID for the source `urn:Source`

'FQID': {
        'ServerId': {
          'Type': 'XPCORS',
          'Hostname': '192.168.2.1',
          'Port': 7563,
          'Id': '5c9bf360-98a5-4d74-8f06-fd6e9b4f4916',
          'Scheme': 'http'
        },
        'ParentId': '5c9bf360-98a5-4d74-8f06-fd6e9b4f4916',
        'ObjectId': '86907ac1-5f32-4231-b936-dab7f1e32567',
        'FolderType': '0',
        'Kind': '5135ba21-f1dc-4321-806a-6ce2017343c0'
      }

Where I see ObjectId is a cameraId, ParentId is RecorderId.

I can retrieve the RecorderId given CameraId by using

 MANAGEMENT_CLIEN_URL = f"http://{self._management_server_host}/ManagementServer/ServerCommandService.svc?wsdl"
...
management_client.service.GetConfiguration(token)
...
cameraID = '86907ac1-5f32-4231-b936-dab7f1e32567'
for i in config['Recorders']['RecorderInfo'][0]['Cameras']['CameraInfo']:
    if i['DeviceId'] == cameraID:
            # retrieve recorderID

But I don’t know how to discover host IP, port, type.

When I give only [‘ServerId’][‘Id’] and assign None to other fields the Alarm will not be associated with a camera.

You cannot get FQID if you use AlarmService. Instead, please use GetConfiguration. You will get recording server URL and the port number and here is a sample called TCP Video Viewer –

https://doc.developer.milestonesys.com/html/index.html?base=samples/tcpviewer_sample.html&tree=tree_3.html

Please run the sample and put a break point on GetConfiguration, line 92 or 97 (it depends on which user you use) in SystemAccess.cs, then you will see the URL and the port number here: this._ntlmConnection.ConfigurationInfo.Recorders[0].WebServerUri (We tested with AD user)