*WEB/WEBSERVICE |
Web Service Utility |
The *web/webservice utility may be called to display a Web Service within a resizable dialog containing a *BROWSER control.
(The *web/webservice utility was added in PxPlus 2018.)
CALL "*web/webservice", url$, title$, servername$, errormsg$
Where:
url$ |
(Input) URL needed to produce the Web Service. Additional type parameter values can be entered (optional), each separated by a space. Example: id=tasks&type=pdf Using this example, the Web Service ID is tasks, and the pdf output type overrides the default output type defined for this Web Service only if Allow Override is selected. If Allow Override is not selected, the pdf output type will not override the default output type. An HTML error will display when a widget for this Web Service is in the Dashboard or when this Web Service is run as a URL on a browser. The HTML error will indicate that this Web Service ID does not allow the override of the specified parameter(s). |
title$ |
(Input) A string value to be used as the Windows dialog title bar. |
servername$ |
(Input) When referencing an existing Web Service ID, you may specify an alternate Web server to use (other than EZWeb running locally) by entering the server and port in the following format: servername$:port# |
errormesg$ |
(Output) If an error is encountered when attempting to display the Web Service, the program will load this variable with a textual description of the problem and then exit. |
Example 1:
To display a Web Service defined with a Service ID of QUERY and a Title of Invoice Query using the EZWeb Server running locally:
CALL "*web/webservice","id=QUERY"
Example 2:
To override the Title, check for errors and use a Web Server running on machine SERVERNAME, port 8888:
CALL "*web/webservice","id=QUERY","Different Title","http://SERVERNAME:8888",errormsg$
Example 3:
To display a Web page:
CALL "*web/webservice","http://www.pvxplus.com","PxPlus Web Page",errormsg$
Example 4:
To display a Dashboard:
CALL "*web/webservice","http://SERVERNAME:8888/services/dashboard","Dashboard Title",errormsg$