Using Ensemble as an ESB
Configuring a Web Application for a Pass-through Business Service
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Search:    

This appendix describes how to configure a web application for a pass-through business service. To configure a web application for the Public Service Registry REST API, see Configuring a Web Application for the Public Service Registry API.

  1. Create an empty role and assign it to the unknown user as follows:
    1. Select System Administration > Security > Roles to display the Roles portal page.
    2. Select the Create New Role button and name the role, for example, Services_Role, and Select the Save button.
    3. Select the Members tab, select the Unknown User, Select the right arrow, and Select the Assign button.
  2. 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 > Web Applications to display the Web Applications portal page. Select 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. All alphabetic characters in the name should be in lower case.
    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.GenericService or EnsLib.SOAP.GenericService.
    8. Select 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.DirectoryService class in ENSDEMO, you must also select the %DB_SAMPLES role. You can select multiple roles while holding the Ctrl key.
      Note:
      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, select the right-arrow button to move them to the Selected text box.
    13. Then select the Assign button.
Note:
If your web application allows both unauthenticated and authenticated service, then it will prompt for a password, but if you do not enter a password, the web applications grants you unauthenticated access.