When you write and deploy a Rich UI application,
you can access an EGL service that is deployed on the application
server, along with the Rich UI handlers. One benefit is that you don't
need to configure the service-location detail when you write or deploy
the application.
You can access the dedicated service by a two-step process:
- Specify a connection variable, which is of type HTTPProxy. Here
is an example:
myConnVar HttpProxy;
- Reference the connection variable in a call statement like
this one:
call MyService.myFunctionName(InField.text)
using myConnVar
returning to handleResponse
onException serviceExceptionHandler;
You can combine the two steps:
call MyService.myFunctionName(InField.text)
using new HttpProxy
returning to handleResponse
onException serviceExceptionHandler
If you intend to deploy the dedicated service as an EGL REST-RPC
service later, you might want to use an Interface type in the
call statement.
In that case, you must instantiate the connection variable and specify
the Service type. Here is an example:
myConnVar HttpProxy = new HttpProxy("server.MyService");
call MyInterfaceType.myfunctionName(InField.text)
using myConnVar
returning to handleResponse
onException serviceExceptionHandler;
If you have access to the IDE, you can create the Interface typet
easily from the Service type:
- In the Project Explorer, right click the EGL file that defines
the service.
- Click EGL Services > Extract EGL Interface.
- In the New EGL Interface part window, specify
the appropriate details and click Finish.