Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Services for Managing Namespace Nodes | Adapter Service Services | wm.art.dev.service:createAdapterServiceNode
 
wm.art.dev.service:createAdapterServiceNode
This service creates a new adapter service node in the specified package and folder from the specified service template and connection alias.
You must perform the following steps to populate the input pipeline:
1. Use wm.art.dev.service:fetchAdapterServiceTemplateMetadata service to identify the supported service template properties and configure the adapterServiceSettings input parameter.
*The service's inputFieldNames, inputFieldTypes, outputFieldNames, and outputFieldTypes parameters in the adapterServiceSettings structure define the properties that comprise the adapter service's input and output signatures.
*The data types of properties in the adapterServiceSettings structure are arrays of java.lang.String type.
*A one-to-one correspondence exists between the elements in the *FieldNames and *FieldTypes arrays. For example, if the property names abc, xyz, and foo are inserted into the outputFieldNames parameter, then the service expects that exactly three data types will be inserted into outputFieldTypes, and that those data types correspond to the same element in outputFieldNames.
*Adapter service properties may or may not have default values, depending on the specific adapter's implementation.
*Depending on the underlying data type of the property, it might not be possible to assign a default value to a property.
*You may use the default values or override them with values that conform to the underlying data types of the properties.
*The property values are not automatically set to their default values; you must explicitly set all the required properties.
*If you omit a property, then no attempt is made to locate and assign default values to the property.
*Adapter service properties may be optional or a required property.
*A required property is identified when the isRequired metadata attribute is set to true.
*The absence of the isRequired attribute implies that the property is not required.
*If you fail to set a required property, the wm.art.dev.service:createAdapterServiceNode service throws an exception.
*You may have properties that might be required, based on the current value of some other property.
*The number of properties to be configured is adapter-dependent. At a minimum, set those properties whose isRequired attribute is set to true.
The resource domains registered by the adapter service template are set in the adapter service's properties according to the interdependencies between the resource domains. This includes input and output signatures since they are supported through resource domains. This service provides the properties inputFieldNames, inputFieldTypes, outputFieldNames, and outputFieldTypes for this purpose. Knowledge of these interdependencies is adapter-specific, and beyond the scope of this service. This service does not interpret resource domains.
Input Parameters
Name
Description
serviceName
String. Required. Namespace name of the new adapter service in the format: folder:node.
packageName
String. Required. Package in which to install the adapter service.
connectionAlias
String. Required. Namespace name of the connection in the format: folder:node.
serviceTemplate
String. Required. Fully qualified pathname of the adapter service template class.
adapterServiceSettings
IData. Required. Structure for passing the adapter's property values.
systemName
String. Required. Adapter service specific internal property name.
inputFieldNames
String[]. Names of the fields used in the adapter's input signature.
inputFieldTypes
String[]. Data types of the fields used in the adapter's input signature.
Note: 
*The following Java data types are supported for connections: char, short, int, long, float, double, boolean, java.lang.String, java.lang.Character, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Float, java.lang.Double, java.lang.Boolean.
*Arrays are supported.
outputFieldNames
String[]. Names of the fields used in the adapter's output signature.
outputFieldTypes
String[]. Data types of the fields used in the adapter's output signature.
Note: 
*The following Java data types are supported for connections: char, short, int, long, float, double, boolean, java.lang.String, java.lang.Character, java.lang.Short, java.lang.Integer, java.lang.Long, java.lang.Float, java.lang.Double, java.lang.Boolean.
*Arrays are supported.
Output Parameters
None.
Example
You must construct adapterServiceSettings to create an adapter service node. The value of a property's systemName is the internal name of the property. When constructing the input parameter adapterServiceSettings, you must use this internal name as the key for setting a property's value. For example, if a service template defines a property named sqlCommand, then its systemName as returned by fetchAdapterServiceTemplateMetadata service is sqlCommand. If the caller is a Java application, it might then use this information to set this property's value as follows:
IData pipeline = IDataFactory.create();
IDataCursor pipeCursor = pipeline.getCursor();
.
.
.
IData svcSettings = IDataFactory.create();
IDataCursor svcCursor = svcSettings.getCursor();
svcCursor.insertAfter("sqlCommand", "SELECT * FROM fooTable");
.
.
.
pipeCursor.insertAfter("adapterServiceSettings", svcSettings);
.
.
.
In this example, the sqlCommand property takes a java.lang.String value.