If the purpose of a resource binding is service access, the definition is called a service binding. The main detail is in one of three categories:
Although you can run the deployed service during an EGL debugging session, the EGL debugger does not step into the service.
A workspace URI is useful only at development time, and an internal Test Server enables you to debug the code. The Test Server is described here: EGL test server.
myBindingVar HttpProxy; call MyInterface.myOperation() using myBindingVar returning to myCallBackFunction onException myExceptionHandler;
call MyInterface.myOperation() using new HttpProxy returning to myCallBackFunction onException myExceptionHandler;
At this writing, you can bind to a REST or EGL REST-RPC service. The distinctions among the service types are explained here: Service-oriented architecture (SOA) for EGL developers (http://www.eclipse.org/edt/papers/topics/egl_soa_overview.html).
For details on defining a service binding in the EGL deployment descriptor, see Adding a REST binding to the EGL deployment descriptor.
If you are defining a workspace binding, you must also deploy the Service type. For details, see Adding web-service deployment details to the EGL deployment descriptor.
myBindingVar HttpRest{@Resource{uri="binding:myEntry"}}; myBindingVar.request.encoding = encoding.json; myBindingVar.request.headers = new dictionary; myBindingVar.request.headers["edt.proxy.invocation.timeout"] = 6; call MyInterfaceType.myFunction() using myBindingVar returning to myCallBackFunction onException myExceptionHandler;
For details on the HttpRest object, see eglx.http package.
myBindingVar HttpRest = new HttpRest{ restType = eglx.rest.ServiceType.TrueRest, uri = "www.example.com/myproject/restservices/weather_service"}; myBindingVar.request.encoding = Encoding.json; call MyInterfaceType.myFunction() using myBindingVar returning to myCallBackFunction onException myExceptionHandler;
For details on the HttpRest object, see eglx.http package.