Skip to main content

Configuring Ensemble for REST Services

This appendix briefly discusses how to configure your system so that you can use REST services through the Ensemble CSP port. This information is intended to help you set up a development or test system for these services. Complete information about these topics is provided in the Caché documentation. See “Configuring Caché” in the Caché System Administration Guide for more details.

To set up an Ensemble development or test system for REST services, follow these steps:

  1. If you have installed Ensemble in a locked down installation, Studio access is disabled. Open the Management Portal and enable Studio access:

    1. Start the Management Portal from the Ensemble cube. You will have to use your Windows login username rather than _system to access the portal. Enter the password that you specified during installation.

    2. Select System Administration, Security, and Services to get to the Services portal page.

    3. The %Services_Bindings service is disabled by default. Select the service name and check the Service Enabled checkbox and save the setting.

  2. If you are not using an existing Ensemble namespace, create a new namespace:

    1. Select System Administration, Configuration, System Configuration, and Namespaces to get to the Namespaces portal page.

    2. Click the Create New Namespace button, specify a name for the namespace, such as SERVICESNS.

    3. Click the Create New Database button for the globals database.

    4. In the Database Wizard, enter a name for the globals database, such as SERVICES_GDB. The wizard uses the name to create a directory for the database.

    5. Click the Next button twice to get to the Database Resource form. Select the Create a new resource radio button. The wizard displays a Create New Resource form. Accept the suggested name, such as %DB_SERVICES_GDB and ensure that Public Permissions Read and Write checkboxes are not checked. Click the Save button on the Database Resource form and the Finish button on the Database Wizard form.

    6. Repeat steps c through e for the routines database.

    7. Click the Save button to complete creating the namespace.

    8. Click Close to close the log.

  3. Create an empty role and assign it to the unknown user:

    1. Select System Administration, Security, and Roles to display the Roles portal page.

    2. Click the Create New Role button and name the role, for example, Services_Role, and click the Save button.

    3. Select the Members tab, select the Unknown User, click the right arrow, and click the Assign button.

  4. Define a web application that will handle calls to the Ensemble CSP port. The web application name defines the root of the URL that will call the service. A single web application can support multiple business services but they must all have a class that is the same or a subclass of the web application dispatch class.

    1. Select System Administration, Security, Applications, and Web Applications to display the Web Applications portal page. Click the Create New Web Application button.

    2. Name the web application, such as /weatherapp or /math/sum. You must start the name with a / (slash) character.

    3. Set the Namespace to the namespace that the production is running in, such as SERVICESNS. Leave the Namespace Default Application unchecked.

    4. You can check the Application, CSP/ZEN, and Inbound Web Services checkboxes.

    5. Leave the Resource Required and Group By ID fields empty.

    6. Check the Unauthenticated checkbox on the Allowed Authentication Methods line.

    7. Set the Dispatch Class to the component class, such as EnsLib.REST.ServiceOpens in a new tab.

    8. Click Save.

    9. Select the Matching Roles tab.

    10. In the Select a Matching Role: field, select the role that you created in the previous step.

    11. In the Select target roles to add to the selected matching role field, select the role or roles associated with the namespace globals and routines. The globals and routines may be in the same database or in separate databases. If your service, accesses another Caché database, you should also select its role. For example, if you are defining a web application for the Demo.REST.DirectoryServiceOpens in a new tab class in ENSDEMO, you must also select the %DB_SAMPLES role. You can select multiple roles while holding the Ctrl key.


      The globals database also may have a secondary database and a corresponding role, such as %DB_GDBSECONDARY. This secondary database is used to store passwords. You don’t need access to this database for pass-through services and operations, but if you create a custom web service that uses password access, you should also add the secondary database role to the target database.

    12. After the roles are highlighted, click the right-arrow key to move them to the Selected text box.

    13. Then click the Assign button.

This completes the system configuration.

FeedbackOpens in a new tab