PLBWEB_REST_CMDLINE Keyword
9.9A
PLBWEB_REST_CMDLINE<nn>=<plbruntime> <options> %s %s
Where:
CGI Examples:
PLBWEB_REST_CMDLINE01=plbwin -h %s %s
PLBWEB_REST_CMDLINE02=c:\mydir\plbnet -i %s %s
PLBWEB_REST_BASEURL99=plb -h %s %s
FASTCGI
Examples:
PLBWEB_REST_CMDLINE01=plbwin -h %s phonefcgi
PLBWEB_REST_CMDLINE02=c:\mydir\plbnet -i %s phonefcgi
PLBWEB_REST_BASEURL99=plb -h %s phonefcgi
1. For CGI based REST services, two '%s' strings are used, but FastCGI REST services use only one.
2. When a PL/B CGI REST web service is detected in a URL the first '%s' is replaced by the PWS server with '-cgi<n> <cgifilename>' string. The <cgifilename> is automatically created by the PWS server.
3. For a CGI based REST service the second '%s' in the command line is replaced by the PWS server with the first segment following the base URL segment. All other segments after the second segment must be decoded in the PL/B program after retrieving the REQUEST_URL keyword data using the RUNTIME 'CgiString' method. Note, that a URL segment is the data between adjacent '/' characters in the URL.
4. For a FastCGI REST service, the command line starts the REST task when the PWS server is initialized. The '%s' is replaced by the PWS server with '-cgi<n> <portnumber>' string.
Example:
URL received From Client Browser:
http://192.168.1.12:8081/MyServices/phonemsg/search/Bill
This is the URL as received from the client browser executing a web application accessing the PWS Server 'MyServices/' REST services to execute the 'phonemsg.plc' PL/B program.
Where:
Command Line formatted and executed by the PWS Server:
plbwin -h -cgi <cgifilename> phonemsg
This is the command generated by the PWS server and executed with the following PWS REST keyword:
PLBWEB_REST_CMDLINE01=plbwin -h %s %s
See Also: PLBWEBSRV Keywords, Server Command Line
![]() |