4.5.1.2. Channels.xml
The channels.xml file contains the XML representation of the exported channel(s) with their parameters.
By default, this file is also static but this will not be very useful to create static channels where all parameters are hardcoded. We want to use the parameters defined at the previous step in the definition.xml file.
To be able to use this parameter, the file has to become dynamic and Babelway uses JSP for the templating language (more information can be found in the section JSP templating language). There are two steps to JSPify the file:
- Add the JSP header
- Rename channels.xml to channels.xml.jsp
Let’s reference the parameters that have been defined in the channels.xml.jsp file (note the renaming here so Babelway can detect which file is using JSP).
<GatewayInfo>
<Gateway>43134</Gateway>
<Type>GATEWAY_IN_SMTP_IN</Type>
<CreationMoment>2021-06-09T16:04:33.632+02:00</CreationMoment>
<LastUpdateMoment>2021-06-09T16:04:33.648+02:00</LastUpdateMoment>
<Name>Smtp in tutorial560595</Name>
<Hub>101</Hub>
<Parameters type="UnmodifiableMap">
[...]
<username type="SmtpUserName">${InEmailAddress}</username>
</Parameters>
[...]
</GatewayInfo>
<GatewayInfo>
<Gateway>43135</Gateway>
<Type>GATEWAY_OUT_SMTP_OUT</Type>
<CreationMoment>2021-06-09T16:04:33.655+02:00</CreationMoment>
<LastUpdateMoment>2021-06-09T16:04:33.698+02:00</LastUpdateMoment>
<Name>Smtp out</Name>
<Hub>101</Hub>
<Parameters type="UnmodifiableMap">
[...]
<toRecipients type="String">${OutEmailAddress}</toRecipients>
[...]
</Parameters>
</GatewayInfo>
Import the connector definition
Connector is now complete and files can be zipped and uploaded to Babelway (Manage & Build → Connector → Manage Connector Definition → Create Connector Definition).
Once the connector has been uploaded, you can now instantiate & configure a new connector.
NB: The visibility parameter will be discussed later in this document.