Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Services for Managing Namespace Nodes | Polling Notification 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 populate the input pipeline according to the table below before calling this service. To obtain a list of supported adapter service template properties, call the service wm.art.dev.service:fetchAdapterServiceTemplateMetadata.
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) would be 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);
.
.
.
This example assumes that the property sqlCommand takes a java.lang.String value.
Use the service's parameters inputFieldNames, inputFieldTypes, outputFieldNames,and outputFieldTypes to define the properties that comprise the adapter service's input and output signatures. The data types of these properties are arrays of java.lang.String. There is a one-to-one correspondence between the elements in the *FieldNames and *FieldTypes arrays. For example, if the property names abc, xyz, and foo are inserted into the outputFieldNamesparameter, 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. (In fact, depending on the underlying data type of the property, it might not be possible to assign it a default value.) You may use these default values or override them with values that conform to the underlying data types of the properties. You must explicitly set all required properties in the input parameter adapterServiceSettings . A required property is one whose metadata attribute isRequiredis set to true. (The isRequired attribute is contained in fetchAdapterServiceTemplateMetadata.) The absence of the isRequiredattribute implies that the property is not required. If you fail to set a required property, the service throws an exception. In addition, be aware of any properties that may become required based on the current value of some other property. This service will not try to locate and assign defaults for properties that you have omitted.
Be aware of any resource domains registered by the adapter service template, and set the service's properties according to the interdependencies between resource domains. This includes input and output signatures since they are supported via resource domains. This service provides the properties inputFieldNames, inputFieldTypes, outputFieldNames,and outputFieldTypesfor this purpose. Knowledge of these interdependencies is notification-specific, and beyond the scope of this service. This service does not interpret resource domains.
Input Parameters
serviceName
String. Required. The namespace folder:node name of the new adapter service.
packageName
String. Required. The package in which to install the adapter service.
connectionAlias
String. Required. The namespace folder:node name of the connection.
serviceTemplate
String. Required. The fully qualified pathname of the adapter service template class.
adapterServiceSettings
IData. Required. The structure for passing the adapter's property values.
.systemName
The value of the systemName property; see notes 1, 2, and 3.
.inputFieldNames
String[]. The names of the fields used in the adapter's input signature.
.inputFieldTypes
String[]. The data types of the fields used in the adapter's input signature; see note 1.
.outputFieldNames
String[]. The names of the fields used in the adapter's output signature.
.outputFieldTypes
String[]. The data types of the fields used in the adapter's output signature; see note 1.
Note: 
1. The following Java data types are supported for adapter services: 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 of all the above data types are also supported.
2. The implementation of the adapter determines whether a particular property is required. To determine whether a property is required, call the service wm.art.dev.service:fetchAdapterServiceTemplateMetadata and check whether its isRequired attribute is set to true. If you do not provide a value for a required property, createAdapterServiceNode throws an exception.
3. The number of properties to be configured is adapter-dependent. At a minimum, set those properties whose isRequired attribute is set to true.
Output Parameters
None.