02-01-2019 09:35 AM
Hi,
I found two options to start LabVIEW Web Services which are acceptable for our requirements:
(a) Create an executable which contains the web service (will run in a separated private web server).
(b) Publish web service to NI Application Web Server.
The main requirement would be to change the web service port number programmatically, which can be done in case of:
(a) If we call the executable (which contains the web service) from an other LabVIEW (main) application, so we can open the service configuration file (niembeddedws.conf), change the port and start executable via "System exec.vi".
(b) We must publish our web service manually to Application Web Server. After that if the main application is running, we have to change the port number of published web service dynamically (i.e: we have to change the App Web Server port). In this case we have to stop the Application Web Server service, change the port number in global configuration file and restart the App Web Server service.
The problem is:
(a) We have to build a main application (exe) which will execute an other executable. It doesn't seem very nice, but everything can be done programmatically.
(b) In this case we have to deploy our web service, which will run inside of App Web Server, and as far I see, it can be unpublish/start/restart manually although it can be done via web configuration page (Tools/Options/Web Server/Configure Web ApplicationServer). To change the port number, we have to stop the App Server, which may be used by another application independently for our application and can break those services.
What do you think, could be a more acceptable solution to run a web service from a main application and handle it dynamically (e.g.: start/restart/change port number)?
Thanks,
Balint
02-07-2019 01:55 AM
Hi,
I was thinking about an elegant solution and I don’t think there is one.
Normally it’s impossible to programmatically Restart or Setup Web Service.
02-07-2019 03:37 AM
Solution (a) is quite common, isn't that how Steam, Origin, GoG and the like works? Or most programs update tools?
/Y