Service-location details for web-service access

Although you can place the service-location details of a web service in the requesting source code, the best practice is to place those details in the EGL deployment descriptor.

By placing the details in a deployment descriptor, you have a few potential advantages. For example, if you place details in the deployment descriptor and a detail of the service location changes, these statements are true:

When you place details in the EGL deployment descriptor, you specify the @BindService complex property when you declare a service-access variable. That property refers to an entry in the EGL deployment description, specifically, to an entry in the service-client bindings section of the EGL deployment descriptor.

The entry in the service bindings section behaves differently depending on the type of service that you access:
When you access a third-party REST service, you must distinguish between the following types of information:

You can access a third-party REST service by specifying all the details in either the base URI or a URI template.