Service-client bindings contain information about how the
EGL runtime code connects to a service that is being invoked by your
EGL code.
To add the binding information:
- In the deployment descriptor editor, open the deployment descriptor.
- On the Service Client Bindings tab, under
Service Client Bindings, click Add.
- In the Add a Service Binding window, click REST
Binding and then click Next. The
Add a REST binding window is displayed.
- Specify a binding key, which is the name of the client-service
binding. You also reference that name in the @BindService property
in your code. The name ties the service-access variable with the binding.
You can type the name of the key or do as follows:
- Click the Browse button, which is next
to the REST Binding Name field. The Interface
Selection window is displayed.
- Select the name of the Interface part that is the basis of a service-access
variable in your code. If that name is the binding key, you do not
need to specify the name when you code the @BindService property
in your code.
- Click OK.
- In the baseURI field, type a string that
identifies the first qualifiers in the URI that is used to access
the service. The default value of baseURI is
an empty string.
- In the sessionCookieID field, type the
name of a session cookie, which is a string that identifies the session
cookie that is provided to the EGL Rich UI Proxy from a service. The
service logic in this case is stateful, which means that the user
and logic can participate in a multistep conversation. This setting
is meaningful only if an EGL external type makes an IBM® i program or service program available as
an EGL REST service, and only if the requester is a Rich UI application.
The default value is JSESSIONID, which is always the session ID when
your application runs on Apache Tomcat.
For background information,
see "Accessing IBM i programs
as Web services."
- Click Finish. The new client binding is
listed in the Service Bindings list. You can
update the binding information later by selecting the client binding
and editing the information under EGL Service Binding.