TsgcWSPClient_WAMP › Methods › Call
Invokes a remote procedure identified by its URI and correlates the eventual result or error to the supplied call id.
procedure Call(const aCallId, aProcURI: String; aArguments: String = '');
| Name | Type | Description |
|---|---|---|
aCallId | const String | Caller-generated unique identifier echoed back in OnCallResult, OnCallProgressResult or OnCallError; typically a GUID so that concurrent calls can be routed to their continuations. |
aProcURI | const String | Fully-qualified URI of the remote procedure, or a shortcut of the form prefix:name resolved through a prior Prefix registration. |
aArguments | String | Optional JSON payload with the call arguments. Pass a JSON array for positional arguments or a JSON object for named arguments; leave empty when the procedure takes none. |
Sends a WAMP v1 CALL message (type id 2) over the active transport. The call is asynchronous: the method returns as soon as the frame is queued and the outcome is delivered later through one of the RPC events. The server may stream interim results via OnCallProgressResult before firing the final OnCallResult or OnCallError. To abort an in-flight call, invoke CancelCall with the same aCallId.
var
vCallId: string;
begin
vCallId := TGuid.NewGuid.ToString;
WAMP.Call(vCallId, 'http://example.com/simple#add', '[23, 19]');
end;