Configuring a Production for SOAP Services
This topic briefly discusses how to configure your system so that you can use HTTP and SOAP services through the Web 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 documentation. See Configuring System-Wide Settings for more details.
To set up an InterSystems IRIS® development or test system for HTTP or SOAP services, follow these steps:
-
If you are not using an existing namespace, create a new namespace.
-
Create an empty role and assign it to the unknown user:
-
Select System Administration, Security, and Roles to display the Roles portal page.
-
Click the Create New Role button and name the role, for example, Services_Role, and click the Save button.
-
Select the Members tab, select the Unknown User, click the right arrow, and click the Assign button.
-
-
Define a web application that will handle calls to the Web 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.
-
Select System Administration, Security, Applications, and Web Applications to display the Web Applications portal page. Click the Create New Web Application button.
-
Name the web application, such as /weatherapp or /math/sum. You must start the name with a / (slash) character.
-
Set the Namespace to the namespace that the production is running in, such as SERVICESNS. Leave the Namespace Default Application unchecked.
-
You can check the Application, CSP/ZEN, and Inbound Web Services check boxes.
-
Leave the Resource Required and Group By ID fields empty.
-
Check the Unauthenticated check box on the Allowed Authentication Methods line.
Or for an alternative, see the tip after this list.
-
Set the Dispatch Class to the component class, such as EnsLib.REST.GenericServiceOpens in a new tab or EnsLib.SOAP.GenericServiceOpens in a new tab.
-
Click Save.
-
Select the Matching Roles tab.
-
In the Select a Matching Role: field, select the role that you created in the previous step.
-
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 InterSystems IRIS database, you should also select its 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.
-
After the roles are highlighted, click the right-arrow key to move them to the Selected text box.
-
Then click the Assign button.
-
If you want to authenticate users:
-
Create a new class, extending EnsLib.SOAP.GenericServiceOpens in a new tab.
-
In this class, override the parameter SECURITYIN, setting it to either ALLOW or REQUIRE.
-
Use this new class when configuring the business service.
-
Use the WS-Security Username Token when invoking the service.
-
In the web application configuration, clear the Unauthenticated option.