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.listener:createListenerNode
 
wm.art.dev.listener:createListenerNode
This service creates a new instance of a listener in the specified package and folder from the specified listener 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 listener template properties, call wm.art.dev.listener:fetchListenerTemplateMetadata.
The value of a property's systemName attribute is the internal name of the property. When constructing the input parameter listenerSettings, use this internal name as the key for setting a property's value. For example, if a listener template defines a property called portNumber, then its systemName (as returned by fetchListenerTemplateMetadata) would be portNumber.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 lstnrSettings = IDataFactory.create();
IDataCursor lstnrCursor = lstnrSettings.getCursor();
lstnrCursor.insertAfter("portNumber", new Integer((int)8888));
.
.
.
pipeCursor.insertAfter("listenerSettings", lstnrSettings);
.
.
.
This example assumes that the property portNumber takes a java.lang.Integer value.
Listener properties may or may not have default values, depending on the specific listener's implementation. 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 listenerSettings. A required property is one whose metadata attribute isRequiredis set to true. (The isRequired attribute is contained in fetchListenerTemplateMetadata.) 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.
The service initializes the new listener in a disabled state. After calling createListenerNode, you should subsequently call the service to activate it. For more information, see the webMethods Integration Server Built-In Services Reference.
You should also consider any resource domains registered by the listener template, and should set the new listener's properties according to the interdependencies between resource domains. Knowledge of these interdependencies is listener-specific, and is beyond the scope of this service. This service does not interpret resource domains.
Input Parameters
listenerName
String. Required. The namespace folder:node name of the new listener.
packageName
String. Required. The package in which to install the listener.
connectionAlias
String. Required. The namespace folder:node name of the connection.
listenerTemplate
String. Required. The fully qualified pathname of the listener template class.
listenerSettings
IData. Required. The structure for passing the listener's property values.
.systemName
The value of the systemName property; see notes 1, 2, and 3.
Note: 
1. The following Java data types are supported for listeners: 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. There is currently no support for arrays.
2. The implementation of the listener determines whether a particular property is required. To determine whether a property is required, call the service wm.art.dev.listener:fetchListenerTemplateMetadata and check whether its isRequired attribute is set to true. If you do not provide a value for a required property, createListenerNode throws an exception.
3. The number of properties to be configured is also listener-dependent. At a minimum, set those properties whose isRequired attribute is set to true.
Output Parameters
None.