ServiceLib.completeBind causes a service-access variable to reference a binding that was created or updated at run time.
eglx.services
static function completeBind (serviceAccessVariable any out, http any const in) returns(any); // serviceAccessVariable
Here is example code, which prepares a variable that is later used in a service-invocation statement:
myService IMyService; myBinding HttpRest{@Resource}; myBinding.request.encoding = Encoding.json; myService = Servicelib.completeBind(myService, myBinding);
myBinding HttpRest{@Resource}; // or myBinding HttpRest = SysLib.getResource("myBinding");
In either case, the EGL runtime code accesses the deployment-descriptor entry named myBinding.
myBinding HttpRest = new HttpRest{ restType = eglx.rest.ServiceType.TrueRest, uri = "www.example.com/myproject/restservices/weather_service};