IBM Worklight v5.0.5 > Develop IBM Worklight applications > Develop the server side of an IBM Worklight application > The adapter XML File

<adapter> element of the adapter XML file


Overview

The <adapter> element is the root element of the adapter configuration file.

IBM Worklight provides two schemas that are 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...

...which is associated with the xsi namespace, and...

...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, an HTTP adapter declares the namespace...

...and associates it with the schema...

The <adapter> element has the following attributes:

Attribute Description
name The name of the adapter. This name must be unique within the WL 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 Defines schema namespaces. This attribute must appear three times...
xmlns:xsi http://www.w3.org/2001/XMLSchema-instance schema.
xmlns:wl http://www.worklight.com/integration schema.
xmlns:namespace 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 the IBM Worklight Studio. At run time, this attribute has no effect.

The <adapter> element has the following subelements:


<adapter> element subelements

Subelement Description
<displayName> Name of the adapter to be displayed in the IBM Worklight Console. Deprecated. Optional.

If the <displayName> element is not specified, the value of the name attribute is used instead in the IBM Worklight Console.

<description> Additional information about the adapter, which is displayed in the IBM Worklight Console. Optional.
<connectivity> Connection properties and load constraints of the back-end system.
< procedure> Access a service exposed by a back-end application. Occurs once for each procedure exposed by the adapter.


Parent The adapter XML File