Declaring a variable to access a remote EGL or native service
When you declare a variable to access a remote EGL service or IBM® i service program, indicate that the binding detail for service access is in the service binding section of the EGL deployment descriptor. You can indicate the relationship of the variable and descriptor by adding the @BindService property to the access variable.
This example shows a variable declaration:
myService MyInterfacePart {@BindService{bindingKey="MyInterfacePart"}};The @BindService property has one field:
- bindingKey
- Identifies the deployment-descriptor entry that includes the binding details.
You can specify the @BindService property
without specifying the bindingKey field.
In that case, the property identifies the deployment-descriptor entry
that has the same name as the Service or Interface part that is used
in the variable declaration. Here is an example of that usage, which
refers to the deployment-descriptor entry named
MyInterfacePart:MyService MyInterfacePart {@BindService{}};For details about setting up the EGL deployment descriptor, see Adding an EGL binding to the deployment descriptor or Adding a native binding to the deployment descriptor.