Adding a REST binding to the EGL deployment descriptor

A REST service binding gives details necessary to access a REST or EGL REST-RPC service.

To add a REST binding to an EGL deployment descriptor, do as follows:
  1. Open the EGL Deployment Descriptor editor by double-clicking the name of an EGL deployment descriptor.
  2. Click Resource Bindings. The Resource Bindings Configuration tab is displayed.
  3. Click Add. The Add a Resource Binding page is displayed.
  4. Click REST service binding and then click Next. The Add a REST Service Binding page is displayed.
  5. In the REST service binding name field, specify the service-binding name, which is also called a key. You specify the service-binding name when you declare a service-access variable and set the Resource annotation, uri field; or when you invoke the Resources.getResource function.
  6. In the baseURI field, specify a Universal Resource Identifier (URI):
    • If you are accessing an EGL REST-RPC service, specify the complete URI. If you specify a workspace URI, remember to set up the deployment detail on the Service Deployment tab.
    • If you are accessing a third-party REST service, you might decide to include only high-level details and to supplement them with values that are stored in an Interface type. Alternatively, you might decide to include no details in the baseURI field and to rely on values in the Interface type.

      For specifics, see the following help topic: "Creating an Interface part to access a REST service."

  7. The sessionCookieID field is not in use.
  8. Click Finish. The Service Bindings Configuration tab is available again.
In the future, you can update the service binding that you just defined:
  1. Open the Resource Bindings tab.
  2. Select the binding.
  3. Edit the displayed information.

The tab includes the enableGenerate check box. The purpose of that check box is to specify whether to deploy the binding information. If you are using a workspace URI or want to keep the binding detail out of the deployed WAR file, clear the check box.