Learn about the function and structure of the Java™ adapter-descriptor file.
The adapter.xml descriptor file is located in the adapter-resources folder, under <JavaScript_adapter>/src/main/.
<mfp:adapter name="Backend_adap"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mfp="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http">
<displayName>Backend_adap</displayName>
<description>Backend_adap</description>
<connectivity>
<connectionPolicy>...</connectionPolicy>
</connectivity>
</mfp:adapter>
The <adapter> element contains the following attributes.
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 you define and deploy an adapter, you cannot modify its name.
The adapter element has the following subelements.
Optional.
The name of the adapter that is displayed in the MobileFirst Operations Console. If this element is not specified, the value of the name attribute is used instead.
Optional.
Additional information about the adapter. Displayed in the MobileFirst Operations Console.
Mandatory.
Defines the mechanism by which the adapter connects to the back-end application. It contains the connectionPolicy subelement. The connectionPolicy subelement is mandatory, and it defines connection properties. The structure of this subelement depends on the integration technology of the back-end application. For more information about connectionPolicy, see HTTP adapter connectionPolicy element and SQL adapter connectionPolicy element.
Mandatory.
Defines a process for accessing a service that is exposed by a back-end application. Occurs once for each procedure that is exposed by the adapter. An example is shown in Implementing JavaScript SQL adapters.
<procedure
name="unique-name"
audit="value"
scope="value"
secured="value"
/>
The procedure element has the following
attributes.Mandatory.
The name of the procedure. This name must be unique within the adapter. It can contain alphanumeric characters and underscores, and must start with a letter.
Optional.
Defines whether calls to the procedure are logged in the audit log. The log file is Project Name/server/log/audit/audit.log.
Optional.
The security scope that protects the adapter resource procedure, as a string of zero or more space-separated scope elements. A scope element can be a keyword that is mapped to a security check, or the name of a security check. The default value of the scope attribute is an empty string. When the value of the secured attribute is false, the scope attribute is ignored.
For information on OAuth resource protection, see OAuth resource protection. For detailed instructions on how to configure resource protection for a JavaScript resource procedure, including how to configure a protecting scope, see Configure protection of JavaScript resources.
Optional.
For information on OAuth resource protection, see OAuth resource protection. For detailed instructions on how to configure resource protection for a JavaScript resource procedure, including how to disable resource protection, see Configure protection of JavaScript resources.
Optional.
Defines a security-check object. For a full reference of the securityCheckDefinition element, see The <securityCheckDefinition> element.
Optional.
Declares a user-defined property.
<property name="unique-name"
description="value"
defaultValue="value"
type="value"
/>
Mandatory.
The name of the property. This name must be unique within the adapter. It can contain alphanumeric characters and underscores, and must start with a letter.
Optional.
A user-friendly description of the property. This is the name that is displayed in the MobileFirst Operations Console.
Mandatory.
Defines the default value of this property. This is the value the property will have if it is not overridden.
Optional.