PLBWEB_REST_CMDLINE Keyword


9.9A

PLBWEB_REST_CMDLINE<nn>=<plbruntime> <options> %s %s

 
This keyword specifies the command line to be formatted and executed by the PWS when a PL/B REST service is found in a client browser URL.
 
This keyword is required and is placed in the [Environment] section of the PWS configuration INI file.

Where:

'nn'
The 'nn' that is appended to the PWS keyword name can be a string value from '01' to '99'.

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

<plbruntime>
The <plbruntime> identifies the PL/B runtime to be executed including 'plbwin', 'plbnet', or 'plb'. Also, the <plbruntime> can be a fully path with the PL/B runtime executable.
<options>
This <options> can be specified as any of the supported {options} found in the PL/B Runtime Reference manual under the command line option descriptions.
%s
The '%s' strings must be specified in the keyword command line string as shown.

 

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:

MyServices
is the PL/B REST service being accessed.
phonemsg
is the PL/B program executed.
search/Bill
is data available to the PL/B program using the RUNTIME 'CgiString' method with the REQUEST_URI keyword.

 

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



PL/B Web Server PLBWEB_REST_BASEURL PLBWEB_REST_MAX_COUNT