Skip to content

XML Connector

Valera V Harseko edited this page Jun 17, 2024 · 1 revision

OpenIDM includes a simple XML file connector. This connector is really useful only in a demonstration context and should not be used in the general provisioning of XML data stores. In real deployments, if you need to connect to a custom XML data file, you should create your own scripted connector by using the Groovy connector toolkit.

Configuring the XML File Connector

A sample XML connector configuration is provided in samples/provisioners/provisioner.openicf-xml.json. The following excerpt of the provisioner configuration shows the main configurable properties:

"connectorRef" : {
        "connectorHostRef": "#LOCAL",
        "bundleName" : "org.openidentityplatform.openicf.connectors.xml-connector",
        "bundleVersion" : "[1.1.0.3,2)",
        "connectorName" : "org.forgerock.openicf.connectors.xml.XMLConnector"
}

The connectorHostRef is optional if the connector server is local.

The configuration properties for the XML file connector set the relative path to the file containing the identity data, and also the paths to the required XML schemas:

{
  "configurationProperties": {
        "xsdIcfFilePath" : "&{launcher.project.location}/data/resource-schema-1.xsd", 
        "xsdFilePath" : "&{launcher.project.location}/data/resource-schema-extension.xsd", 
        "xmlFilePath" : "&{launcher.project.location}/data/xmlConnectorData.xml"
  }
}

&{launcher.project.location} refers to the project directory of your OpenIDM instance, for example, path/to/openidm/samples/sample1. Note that relative paths such as these work only if your connector server runs locally. For remote connector servers, you must specify the absolute path to the schema and data files.

xsdIcfFilePath

References the XSD file defining schema common to all XML file resources. Do not change the schema defined in this file.

xsdFilePath

References custom schema defining attributes specific to your project.

xmlFilePath

References the XML file that contains account entries.