The <adapter> element of the adapter XML file
The <adapter> element is the root element and has various attributes and subelements.
The <adapter> element is the root element of the adapter configuration file. It has the following structure:
<wl:adapter name="adapter-name" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wl="http://www.worklight.com/integration" xmlns:http="http://www.worklight.com/integration/http" xmlns:sql="http://www.worklight.com/integration/sql" xsi:schemaLocation=" http://www.worklight.com/integration integration.xsd http://www.worklight.com/integration/http http.xsd http://www.worklight.com/integration/sql sql.xsd >MPF provides two schemas used by all adapters, and in addition, provides a specific schema for each type of adapter. Each schema must be associated with a different namespace. Namespaces are declared using the xmlns attribute, and are linked to their schemas using the xsi:schemaLocation attribute.
The mandatory schemas are http://www.w3.org/2001/XMLSchema-instance, which is associated with the xsi namespace, and http://www.worklight.com/integration, which is associated with the wl namespace.
Because each adapter connects to a single back-end application and uses a single integration technology, each adapter only requires one back-end-related namespace. For example, for an HTTP adapter we must declare the xmlns:http namespace and associate it with the http.xsd schema.
The <adapter> element has the following attributes:
Attribute Description name Mandatory. The name of the adapter. This name must be unique within the MobileFirst Server. It can contain alphanumeric characters and underscores, and must start with a letter. After an adapter has been defined and deployed, its name cannot be modified.
xmlns:namespace Mandatory. Defines schema namespaces. This attribute must appear three times, as follows:
- xmlns:xsi – Defines the namespace associated with the http://www.w3.org/2001/XMLSchema-instance schema.
- xmlns:wl – Defines the namespace associated with the http://www.worklight.com/integration schema.
- xmlns:namespace – Defines the namespace associated with the schema related to the back-end application, for example, xmlns:sap or xmlns:sql.
xsi:schemaLocation Optional. Identifies the schema locations, in the following format: xsi:schemaLocation="http://www.worklight.com/integration location-of-integration-schema-file URI-of-specific-adapter-schema location-of-schema"
If the attribute is missing, auto-complete for XML elements and attributes defined in the schema will not be available in MobileFirst Studio.
At run time, this attribute has no effect.
The <adapter> element has the following subelements:
Subelement Description <displayName> Note: This element is deprecated. Optional. The name of the adapter to be displayed in the operations console.
If the <displayName> element is not specified, the value of the name attribute is used instead in the operations console.
<description> Optional. Additional information about the adapter, which is displayed in the operations console. <connectivity> Mandatory. Defines the connection properties and load constraints of the back-end system. <procedure> Mandatory. Defines a process for accessing a service exposed by a back-end application. Occurs once for each procedure exposed by the adapter.
Parent topic: The adapter XML File