Client API- Communication Methods


Home>Product Description>Programmer API>Client API

Communication Methods

$Request

Sends a request to the server that executes a specified method in a Plug-in and returns the response.

Syntax

Do code method wpxtools.api/$Request(iPort,cPlug,cCode,cMethod,bEncypt,vRequest,vResponse) Returns cErrMsg

iPort

long int - the request port.

cPlug

character - the Plug-in name.

cCode

character - the code class name.

cMethod

character - the code method name.

bEncrypt

boolean   - encryption flag.

vRequest

variable containing request parameters.

vResponse

variable that receives the response.

cErrMsg

character variable that receives an error message, empty if no error occurred.

Notes

iPort is either zero or a valid port number. If zero, the port in the host file is used.

bEncrypt is kTrue to encrypt the request or kFalse to transmit as plain text. Encryption doubles the transmitted data length.

vRequest and vResponse may be any of the following data types:
kBinary, kBoolean, kCharacter, kDate, kInteger, kList, kNumber, kRow, kSequence.

Lists and rows may contain any of the above data types. Lists and rows passed in vRequest will arrive at the Plug-in method with column data types defined as specified but with generic column names (C1, C2 etc). These names can be used, or the list/row can be redefined as required. The same is true for lists and rows returned in vResponse.

$Request displays status messages in the client application as follows:
  • If the window that calls the request has a status bar with pane 1 defined, status messages will be displayed in that status pane.
  • If the window that calls the request has no status bar, or does not have pane 1 defined, status messages will be displayed in a working message.
©Corporate Windows Pty Limited 2012 Previous | Back to API