Take a survey

Invoking LiveCycle ES > Invoking LiveCycle ES Using LiveCycle Remoting

Invoking LiveCycle ES Using LiveCycle Remoting
Most services in the service container are configured so that you can access them through LiveCycle Remoting. This is a specialized feature based on the standard Data Services ES remote object feature. LiveCycle Remoting provides functionality similar to that found in the web services interface, but offers faster performance, improved security, and an object-oriented programming model.
LiveCycle Remoting supports synchronous and asynchronous service invocation through the following syntax. You set the remote object's destination property to the service endpoint name shown in the LiveCycle Administrator.
 
RemoteObjectName.operationName
RemoteObjectName.operationName_Async
To invoke a service synchronously, you invoke an operation directly and an invocation result is returned directly.
A Flex client application passes input parameters wrapped in an ActionScript object with fields that correspond to parameter names on the LiveCycle operation being invoked, as the following example shows:
...
var params:Object = new Object();
params["parentResourcePath"] = parentResourcePath;
params["resource"] = resource;
// Invoke an operation synchronously:
repositoryService.writeResource(params);
...
Output parameters of an invocation result from the LiveCycle server are deserialized into ActionScript objects from which the Flex client application extracts specific parameters by name, as the following example shows:
...

var res:Object = event.result;
var docRef:DocumentReference = res["pdfDoc"] as DocumentReference;
...
LiveCycle Remoting also provides a fixed Data Services ES destination called LC.JobManager that lets you get the status and results of asynchronous operations. When you execute an operation asynchronously, both the LC.JobManager.getStatus operation and the LC.JobManager.getResults operation take a jobId as an input parameter and return an AsyncToken object that contains the RemoteObject result. The getStatus operation returns an ActionScript object, called JobStatus, that wraps a constant status code. The getResult operation returns the list of results.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/invokingLCRemoting.25.1.html