ÃÛ¶¹ÊÓƵ

Configure data sources configure-data-sources

Version
Article link
AEM 6.5
Click here
AEM as a Cloud Service
This article

Data integration

Experience Manager Forms Data Integration lets you configure and connect to disparate data sources. The following types are supported out-of-the-box:

  • Relational databases - MySQL, Microsoft® SQL Server, IBM® DB2®, postgreSQL, and Oracle RDBMS
  • RESTful web services
  • SOAP-based web services
  • OData services (Version 4.0)
  • Microsoft® Dynamics
  • SalesForce
  • Microsoft® Azure Blob Storage

Data integration supports OAuth2.0(, ), Basic Authentication, and API Key authentication types out-of-the-box, and allows implementing custom authentication for accessing web services. While RESTful, SOAP-based, and OData services are configured in Experience Manager as a Cloud Service, JDBC for relational databases and connector for Experience Manager user profile are configured in Experience Manager web console.

Configure relational database configure-relational-database

Prerequisites

Before configuring relational databases using Experience Manager Web Console Configuration, it is mandatory to:

Steps to configure a relational database

You can configure relational databases using Experience Manager Web Console Configuration. Do the following:

  1. Go to Experience Manager web console at https://server:host/system/console/configMgr.

  2. Locate Day Commons JDBC Connections Pools configuration. Select to open the configuration in edit mode.

    JDBC Connector Pool

  3. In the configuration dialog, specify the details for the database you want to configure, such as:

    • Javaâ„¢ class name for the JDBC driver

    • JDBC connection URI

    • Username and password to establish connection with the JDBC driver

    • Specify a SQL SELECT query in the Validation Query field to validate connections from the pool. The query must return at least one row. Based on your database, specify one of the following:

      • SELECT 1 (MySQL and MS® SQL)
      • SELECT 1 from dual (Oracle)
    • Name of the data source

    Sample strings for configuring a relational database:

    code language-text
       "datasource.name": "sqldatasourcename-mysql",
       "jdbc.driver.class": "com.mysql.jdbc.Driver",
       "jdbc.connection.uri": "jdbc:mysql://$[env:AEM_PROXY_HOST;default=proxy.tunnel]:30001/sqldatasourcename"
    
    note note
    NOTE
    See SQL connections using JDBC DataSourcePool for more detailed information.
  4. Select Save to save the configuration.

Now, you can use the configured relational database with your Form Data Model (FDM).

Configure folder for cloud service configurations cloud-folder

Configuration for cloud services folder is required for configuring cloud services for RESTful, SOAP, and OData services.

All cloud service configurations in Experience Manager are consolidated in the /conf folder in Experience Manager repository. By default, the conf folder contains the global folder where you can create cloud service configurations. However, you must manually enable it for cloud configurations. You can also create additional folders in conf to create and organize cloud service configurations.

To configure the folder for cloud service configurations:

  1. Go to Tools > General > Configuration Browser.

  2. Do the following to enable the global folder for cloud configurations or skip this step to create and configure another folder for cloud service configurations.

    1. In the Configuration Browser, select the global folder and select Properties.

    2. In the Configuration Properties dialog, enable Cloud Configurations.

    3. Select Save & Close to save the configuration and exit the dialog.

  3. In the Configuration Browser, select Create.

  4. In the Create Configuration dialog, specify a title for the folder, and enable Cloud Configurations.

  5. Select Create to create the folder enabled for cloud service configurations.

Configure RESTful web services configure-restful-web-services

RESTful web services can be described using in JSON or YAML format in a Swagger definition file. To configure RESTful web service in Experience Manager as a Cloud Service, ensure that you have either the Swagger file () or Swagger file () on your file system or the URL where the file is hosted.

Configure RESTful services for Open API Specification version 2.0 configure-restful-services-open-api-2.0

  1. Go to Tools > Cloud Services > Data Sources. Select to select the folder where you want to create a cloud configuration.

    See Configure folder for cloud service configurations for information about creating and configuring a folder for cloud service configurations.

  2. Select Create to open the Create Data Source Configuration wizard. Specify a name and optionally a title for the configuration, select RESTful Service from the Service Type drop-down, optionally browse and select a thumbnail image for the configuration, and select Next.

  3. Specify the following details for the RESTful service:

    • Select a URL or File from the Swagger Source drop-down, and accordingly specify the Swagger URL to the Swagger definition file or upload the Swagger file from your local file system.

    • Based on the Swagger Source input., the following fields are pre-populated with values:

      • Scheme: The transfer protocols used by the REST API. The number of scheme types that display in the drop-down list depend on the schemes defined in the Swagger source.
      • Host: The domain name or IP address of the host that serves the REST API. It is a mandatory field.
      • Base Path: The URL prefix for all API paths. It is an optional field.
        If necessary, edit the pre-populated values for these fields.
    • Select the authentication type — None, OAuth2.0(, ), Basic Authentication, API Key, or Custom Authentication — to access the RESTful service, and accordingly provide details for authentication.

    If you select API Key as the authentication type, specify the value for the API key. The API key can be sent as a request header or as a query parameter. Select one of these options from the Location drop-down list and specify the name of the header or the query parameter in the Parameter Name field accordingly.

  4. Select Create to create the cloud configuration for the RESTful service.

Configure RESTful services for Open API Specification version 3.0 configure-restful-services-open-api-3.0

  1. Go to Tools > Cloud Services > Data Sources. Select to select the folder where you want to create a cloud configuration.

    See Configure folder for cloud service configurations for information about creating and configuring a folder for cloud service configurations.

  2. Select Create to open the Create Data Source Configuration wizard. Specify a name and optionally a title for the configuration, select RESTful Service from the Service Type drop-down, optionally browse and select a thumbnail image for the configuration, and select Next.

  3. Specify the following details for the RESTful service:

    • Select a URL or File from the Swagger Source drop-down, and accordingly specify the Swagger 3.0 URL to the Swagger definition file or upload the Swagger file from your local file system.
    • Based on the Swagger Source input, the connection information with the target server is displayed.
    • Select the authentication type — None, OAuth2.0(, ), Basic Authentication, API Key, or Custom Authentication — to access the RESTful service, and accordingly provide details for authentication.

    If you select API Key as the authentication type, specify the value for the API key. The API key can be sent as a request header or as a query parameter. Select one of these options from the Location drop-down list and specify the name of the header or the query parameter in the Parameter Name field accordingly.

  4. Select Create to create the cloud configuration for the RESTful service.

Some of the operations not supported by RESTful services Open API Specification version 3.0 are:

  • Callbacks
  • oneof/anyof
  • Remote reference
  • Links
  • Different request bodies for different MIME types for a single operation

See for detailed information.

Form data model (FDM) HTTP client configuration to optimize performance fdm-http-client-configuration

Experience Manager Forms form a data model when integrating with RESTful web services as the data source includes HTTP client configurations for performance optimization.

Set the following properties of the Form Data Model HTTP Client Configuration for REST data source configuration to specify the regular expression:

  • Use the http.connection.max.per.route property to set the maximum number of permitted connections between form data model (FDM) and RESTful web services. The default value is 20 connections.

  • Use the http.connection.max property to specify the maximum number of permitted connections for each route. The default value is 40 connections.

  • Use the http.connection.keep.alive.duration property to specify the duration, for which a persistent HTTP connection is kept alive. The default value is 15 seconds.

  • Use the http.connection.timeout property to specify the duration, for which the Experience Manager Forms server waits for a connection to establish. The default value is 10 seconds.

  • Use the http.socket.timeout property to specify the maximum time period for inactivity between two data packets. The default value is 30 seconds.

The following JSON file displays a sample:

{
   "http.connection.keep.alive.duration":"15",
   "http.connection.max.per.route":"20",
   "http.connection.timeout":"10",
   "http.socket.timeout":"30",
   "http.connection.idle.connection.timeout":"15",
   "http.connection.max":"40"
}
  1. Select Form Data Model HTTP Client Configuration for REST data source.

  2. In the Form Data Model HTTP Client Configuration for REST data source dialog:

    • Specify the maximum number of permitted connections between form data model (FDM) and RESTful web services in the Connection limit in total field. The default value is 20 connections.

    • Specify the maximum number of permitted connections for each route in the Connection limit on per route basis field. The default value is two connections.

    • Specify the duration, for which a persistent HTTP connection is kept alive, in the Keep alive field. The default value is 15 seconds.

    • Specify the duration, for which the Experience Manager Forms server waits for a connection to establish, in the Connection timeout field. The default value is 10 seconds.

    • Specify the maximum time period for inactivity between two data packets in the Socket timeout field. The default value is 30 seconds.

Configure SOAP web services configure-soap-web-services

SOAP-based web services are described using . Experience Manager Forms do not support the RPC-style WSDL model.

To configure SOAP-based web service in Experience Manager as a Cloud Service, ensure that you have the WSDL URL for the web service, and do the following:

  1. Go to Tools > Cloud Services > Data Sources. Select to select the folder where you want to create a cloud configuration.

    See Configure folder for cloud service configurations for information about creating and configuring a folder for cloud service configurations.

  2. Select Create to open the Create Data Source Configuration wizard. Specify a name and optionally a title for the configuration, select SOAP Web Service from the Service Type drop-down, optionally browse and select a thumbnail image for the configuration, and select Next.

  3. Specify the following for the SOAP web service:

    • WSDL URL for the web service.

    • Service Endpoint. Specify a value in this field to override the service endpoint mentioned in WSDL.

    • Select the authentication type — None, OAuth2.0(, ), Basic Authentication, or Custom Authentication — to access the SOAP service, and accordingly provide the details for authentication.

  4. Select Create to create the cloud configuration for the SOAP web service.

Enable the use of import statements in SOAP web services WSDL enable-import-statements

You can specify a regular expression that serves as the filter for absolute URLs that are allowed as import statements in SOAP web services WSDL. By default, there is no value in this field. As a result, Experience Manager blocks all import statements available in WSDL. If you specify .* as the value in this field, Experience Manager allows all import statements.

Set the importAllowlistPattern property of the Form Data Model SOAP Web Services Import Allowlist configuration to specify the regular expression. The following JSON file displays a sample:

{
  "importAllowlistPattern": ".*"
}

To set values of a configuration, Generate OSGi Configurations using the AEM SDK, and deploy the configuration to your Cloud Service instance.

Configure OData services config-odata

An OData service is identified by its service root URL. To configure an OData service in Experience Manager as a Cloud Service, ensure that you have service root URL for the service, and do the following:

NOTE
Form data model (FDM) supports .
For a step-by-step guide to configure Microsoft®® Dynamics 365, online or on-premises, see Microsoft® Dynamics OData Configuration.
  1. Go to Tools > Cloud Services > Data Sources. Select to select the folder where you want to create a cloud configuration.

    See Configure folder for cloud service configurations for information about creating and configuring a folder for cloud service configurations.

  2. Select Create to open the Create Data Source Configuration wizard. Specify a name and optionally a title for the configuration, select OData Service from the Service Type drop-down, optionally browse and select a thumbnail image for the configuration, and select Next.

  3. Specify the following details for the OData service:

    • Service Root URL for the OData service to be configured.
    • Select the authentication type — None, OAuth2.0(, ), Basic Authentication, API Key, or Custom Authentication — to access the OData service, and accordingly provide the details for authentication.

    If you select API Key as the authentication type, specify the value for the API key. The API key can be sent as a request header or as a query parameter. Select one of these options from the Location drop-down list and specify the name of the header or the query parameter in the Parameter Name field accordingly.

    note note
    NOTE
    Select the OAuth 2.0 authentication type to connect with Microsoft®® Dynamics services using the OData endpoint as the service root.
  4. Select Create to create the cloud configuration for the OData service.

Next steps next-steps

You have configured the data sources. Next you can create a Form Data Model (FDM) or if you have already created a Form Data Model (FDM) without a data source, you can associate it with the data sources you configured. See Create form data model for details.

recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab