Table des matières


Wiservice

Wiservice

Rôle

WIService is a Python programm binding an http request between a web service server session (IIS, http, …) and a WI.HDL session 1)

Installation

Windows

Linux

Configuration

Ini file code Options service linux Description
DEFAULT_PORT -l ou –listening Port number that the server will use to get HTTP requests and transmit them to the DB
Default = 1508
DEFAULT_WI -w ou –wi Port number that the server will use to get connexions from DB
DEFAULT_TIMEOUT -t ou –timeout Server waiting time to get an available handler.
In case of timeout, the request will not succeed ans the WIService returns an error (no handler available).
default = 5 seconds.
DEFAULT_HEARTBEAT -b ou –heartbeat Out of service duration of a service handler.
After this time, a message is sent to extend this duration, otherwise connexion risks to be lost.
Default = 20 seconds
DEFAULT_MAXEXEC -m ou –maxexecute Maximum duration of the requests to the DB.
If processing is too long, an error is sent to the browser.
Default = 60 seconds
DEBUG -d ou –debug Debug mode. If true, no message will be displayed.
Default = False
DEBUG_DEV -D Developer mode. Always stays on False, unless you need to debug WIService program.
Default = False

Windows

#------------------------------------------------------
# Fichier de config du service windows "WIService"
# si une valeur n'est pas mentionnée ou vide, ce sera
# la valeur par défaut qui sera mentionnée
#------------------------------------------------------
# DEFAULT_PORT      = Port number that the server will use to get
#                     HTTP requests and transmit them to the DB
#                     Default = 1508
# DEFAULT_WI        = Port number that the server will use to get connexions from DB 
#                     Default = 1505
# DEFAULT_TIMEOUT   = Server waiting time to get an available handler. 
#                     In case of timeout, the request will not succeed ans the WIService returns an error.
#                     Default = 5 seconds 
#                     Error message = no handler available 
# DEFAULT_HEARTBEAT = Out of service duration of a service handler. 
#                     After this time, a message is sent to extend this duration, otherwise connexion risks to be lost.
#                     Default = 20 seconds
# DEFAULT_MAXEXEC   = Maximum duration of the requests to the DB. 
#                     If processing is too long, an error is sent to the browser.
#                     Default = 60 seconds
# DEBUG             = Debug mode. If true, no message will be displayed.
#                     Default = False
# DEBUG_DEV         = Developer mode. Always stays on False, unless you need to debug WIService program.
#                     Default = False
#------------------------------------------------------
# Remove # devant la variable pour activer un paramètre
#------------------------------------------------------
#DEFAULT_PORT = 1508
#DEFAULT_WI = 1505
#DEFAULT_TIMEOUT = 5
#DEFAULT_HEARTBEAT = 20 
#DEFAULT_MAXEXEC = 60
#DEBUG = False
#DEBUG_DEV = False

Linux

Procédure

Check that WIService receives requests

Trying to start server on localhost:1508 , wiservice listening on 1505
[Fri Jun 19 15:08:21 2015] ? GET /wiapp : 500 - Erreur de traitement : Pool default inconnu
On the database server, you must open port 1505 in order to let WI.HDL lines on DB Server (Integrix) connect to WIService

Log

In WIService directory, wiservice.log displays the requests processed this day

A line of the log file displays :

[Fri Jun 19 11:40:35 2015] 192.168.0.82->masterdev GET /dos/AC.TEST&w3hostname=TP&w3exec=ac.ctr : 200 - application/json; charset=UTF-8 , duree: 0.156986 sec
[Fri Jun 19 11:45:22 2015] 192.168.0.97->masterdev GET /dco/3?&w3hostname=TP&w3exec=ac.ctr : 404 - Enregistrement 3 inexistant !
[Fri Jun 19 12:09:41 2015] 192.168.0.79->masterdev GET /gcf?&w3hostname=TP&w3exec=ac.ctr : 504 - attente trop longue : 0.140280 sec
[Fri Jun 19 13:32:22 2015] 192.168.0.82->masterdev POST /dap?&w3hostname=TP&w3exec=ac.ctr : 500 - Erreur de traitement : Erreur lors de la communication avec le Handler Erreur lecture chr(0)
Date Adresse IP client Nom serveur WEB Methode Url Statut Content-type Type de message Durée
[Fri Jun 19 11:40:35 2015] 192.168.0.82 masterdev GET /dos/AC.TEST?&w3hostname=TP&w3exec=ac.ctr 200 application/json; charset=UTF8 duree : 0.156986 sec
[Fri Jun 19 11:45:22 2015] 192.168.0.97 masterdev GET /dco/3?&w3hostname=TP&w3exec=ac.ctr 404 Erreur de traitement Enregistrement 3 inexistant !
[Fri Jun 19 12:09:41 2015] 192.168.0.79 masterdev GET gcf?&w3hostname=TP&w3exec=ac.ctr 504 attente trop longue 0.140280 sec
[Fri Jun 19 13:32:22 2015] 192.168.0.82 masterdev POST /dap?&w3hostname=TP&w3exec=ac.ctr 500 Erreur de traitement Erreur lors de la communication avec le Handler Erreur lecture chr(0)
1)
WI.HDL is a phantom line on DB server, receiving informations from an HTTP request and processing it