I am developing a WinCC OA application with 2 redundant systems. These systems need to interface to several web-services. Some are SOAP/XML, some are REST interfaces. Every interface needs to be able to write data back into the WinCC OA systems. Some interfaces are planned on WinCC OA client systems while others are intended to run on the servers.
I intend to use the C# API to create managers for these tasks. The C# examples using tasks to handle the async behavior and we are planning a separate thread for SOAP/XML and REST communication. I have 2 questions:
1) How can I detect a manager shutdown from WinCC OA so I can gracefully shutdown the SOAP client objects?
2) Is there already a C# example available which handles redundancy?
Niels Peerdeman
C# api SOAP/XML and redundancy
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: C# api SOAP/XML and redundancy
2) You could use the 'OaManager' events 'RedundancyActive' and 'RedundancyPassive'.
1) An new event must be implemented for this. Please contact your local support contact for an official request.
1) An new event must be implemented for this. Please contact your local support contact for an official request.
- NielsPeerdeman
- Posts:2
- Joined: Fri Oct 06, 2017 2:16 pm
Re: C# api SOAP/XML and redundancy
Ok, after another day of searching:
1) The OaManager object does not have virtual functions. overriding of stop() or dispose() methods is not possible. The following event is trapped when a normal stop is send from WinCC OA console :
AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
This can be used to shutdown worker threads.
2) This seems to be working.
1) The OaManager object does not have virtual functions. overriding of stop() or dispose() methods is not possible. The following event is trapped when a normal stop is send from WinCC OA console :
AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit;
This can be used to shutdown worker threads.
2) This seems to be working.