Hi every one,
I am writing a c# application that need to interact with a XProtect Corporate.
I want to use only socket or a soap client ( and not the sdk ). My application need to be notified when a user defined event has been triggered.
* Can I use the central protocol ? if yes, where can i change the server port related to this protocol ? From the documentation, the port used by the central protocol is 1237 (https://doc.developer.milestonesys.com/html/reference/components/central_protocol_api.html#xml3)
But it seems that listening socket is not opened on the port 1237
* There is a particular web service which allow to get the lastest triggered user defined events ?
Thanks
Central protocol only exists in e-code XProtect products, currently XProtect Professional and XProtect Express, but not in c-code; XProtect Corporate, Expert, and Plus products.
The Status Soap protocol is the protocol in c-code that has similar usage, and this protocol exists in c-code (but not in e-code).
It would actually also be possible to use the Alarm Command Protocol which is a service on the Event Server.
We have a couple of Status API samples.. Status Console, Status Session Console, System Status Client Console
Where can I found any informations about the Status Soap protocol ?
We can’t use the sdk used by samples “Status console, Status Session Console” etc.. for multiple reasons:
The sdk is compiled in x64 and our existing app must run in x86 mode
In .Net, it’s not possible for any x86 application to used objects located in x64 assembly.
The sdk use the singleton pattern and does not provide a static factory method or a factory class
The second reason, it that the EnvironmentManager class don’t provide an instance constructor. And to get an instance, you have to pass to a static instance.
public abstract class EnvironmentManager
{
protected EnvironmentManager();
public static EnvironmentManager Instance { get; set; }
}
var manager = EnvironmentManager.Instance;
if ( object.ReferenceEquals( manager , EnvironmentManager.Instance ) )
{
MessageBox.Show( “same instance!!” );
}
We know that it is possible to use a surrogate process, or deal with AppDomain to create a kind of Sandbox because static instance are different accross AppDomain. Going to that way impose a lot of complexity just because the sdk doesn’t provide an instance constructor…, and force to marshall the different call on SDK object.
We can’t deal with a singleton here. Singleton pattern break the concept of our application.
Highly thankful for your reply
Just one more question about the status SOAP protocol,
As I can see, this web service allows to subscribe to events.
So I don’t know exactly how XProtect works, and how messages travels between servers modules.
Just to be sure, could you tell if I am right ?
When a smart client raise a user defined event, the event arrive at the central server, and at this moment there is a propagation of this event and this event is also received by others servers modules like recorders, and any applications connected to a recorder can also catch this event by using the web service RecorderStatusService ?
You are correct but a note needs to be added: ”A recorder will only receive a User-Defined event, if it subscribes to it – because of a defined rule or StatusAPI subscription”