send(body: String, callback: PP.Delegate | Function, errorCallback: PP.Delegate | Function, contentType: String, urlParams: String);
body. Body of web service query.
callback. Callback procedure.
errorCallback. Callback procedure on error.
contentType. Used protocol:
application/json. The JSON-RPC protocol is used. Default
text/xml. The SOAP protocol is used.
urlParams. URL query parameters.
The send method requests the service of formulas.
To execute the example, the HTML page must contain the TransformDialog component named dialog (see Example of Creating the TransformDialog Component). Get the number of functions for a simple tree:
// Create a service of expressions var expService = new PP.Ufe.ExpressionService({ Metabase: expressBox.getSource().getMetabase() }); // Get the number of functions for a simple tree var body = { GetMsInfo: { tMb: expressBox.getSource().getMetabase().getConnectionOdId(), tArg: { pattern: { ufeFunctions: "Ts" } } } }; var func = function(sender, args) { var res = JSON.parse(args.ResponseText); console.log("Number of formulas: " + res.GetMsInfoResult.meta.ufeFunctions.its.Item.length); } expService.send(body, func);
As a result the console displays the number of functions for a simple tree:
Number of functions: 134
See also: