Learn about the function and structure of the Java™ adapter-descriptor file.
You use the adapter.xml descriptor file to declare the display name, description, class name of the JAX-RS application and security checks procedures that are exposed by a Java adapter to applications and to other adapters. The elements, subelements, and attributes of the JavaScript adapter XML file are described in the following sections.
The adapter.xml descriptor file is located in the adapter-resources folder, under <Java_adapter>/src/main/.
<?xml version="1.0" encoding="UTF-8"?>
<mfp:adapter name="JavaAdapter1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mfp="http://www.ibm.com/mfp/integration">
<displayName>JavaAdapter1</displayName>
<description>JavaAdapter1</description>
<JAXRSApplicationClass>com.acme.JavaAdapter1Application</JAXRSApplicationClass>
<securityCheckDefinition
name="UserAuthenticationSC"
class="com.my_company.package.MyUserAuthenticationSecurityCheck">
<property
name="maxAttempts"
displayName="Maximum attempts"
defaultValue="3"
description="Maximum allowed user-authentication attempts"/>
</securityCheckDefinition>
<property name="path" description="The path after the host name" defaultValue="/feed">
</mfp:adapter>
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 for exposing an /adapter endpoint.
Defines the class name of the JAX-RS application of this adapter. In the example, it is com.acme.JavaAdapter1Application. For more information, see Implementing the JAX-RS service of the adapter.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"
/>
The property element has the following
attributes.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.