Send an Expression to the Server

DESCRIPTION:

Sends a string containing one or more Spotfire S+ command(s) to the server and retrieves the results.

USAGE:

expressionService.eval(serverUrl, userName, password = NA, cmd, async)

ARGUMENTS:

serverUrl
A character string identifying the server's address (for example: "http://myserver:8080").
userName
A character string containing the identifier (the login name) of user (for example: "johndoe").
password
A character string used to log into the Spotfire S+ server (for example: "myPassword").
cmd
The Spotfire S+ expression to be evaluated (for example: "121^2").
async
Required. TRUE if the expression is to be run asynchronously; otherwise FALSE.

DETAILS:

The password is not encrypted when it is sent from the client to the server. You can omit the password parameter if server does not require one.

VALUE:

The output is a data frame containing one row. This row contains information about the job that was submitted to the server. The column names are:
>
splusCode
>
created
>
createdBy
>
jobId
>
status
>
resultsDir
>
error
>
warnings
>
output
>
resultSpxml

If async is TRUE, you can retrieve the jobID from the returned dataframe and query the server at a later time to retrieve the status of the job or the job results. Also, you can use the jobID to retrieve any files that were generated by the request on the server.

If async is FALSE, you can access the output of the job from the resultSpxml column of the returned data frame.

If async is FALSE, you can use the parseXML method in the spxml library to convert the resultSpxml string into Spotfire S+ objects.

SEE ALSO:

,

EXAMPLES:

## Not run: 
##userName <- "johndoe"
##password <- "mypassword"
##serverUrl <- "http://myserver:8080"
##webdavRoot = paste(serverUrl, "/SPServer/webdav", sep = "")
##resultsFolder <- paste(webdavRoot, "/results", sep = "")
##
##job <- expressionService.eval(serverUrl, userName, password, "121^2", FALSE)
## End(Not run)