ISAM Mapping Rules – Accessing Server Connection Details

With the release of ISAM, it’s now possible to access connection details from an appliances Server connection in a JavaScript mapping rule:

Web Server connection dialog

This means you can now write more portable mapping rules, where the configuration details for an environment can be stored in appliance level configuration, rather than your mapping rules.

Accessing the values for these are fairly straightforward:


//Web Server Connection Details
servername = "RESTEndpointServer";
var ws1 = ServerConnectionFactory.getWebConnectionByName(servername);
if (ws1 == null) {
        ("Couldn't get Web Server Connection "+ servername);

var restURL = ws1.getUrl();
var restUsername = ws1.getUser();
var restPassword = ws1.getPasswd();
var restisSsl= ws1.isSsl();
var restKeystore = ws1.getKeystore();
var restKeyLabel = ws1.getLabel();

These can then be fed into your HTTP callouts in your mapping rule.

Documented in the JavaScript Javadoc (From the file in the appliance file downloads:

JavaScript JavaDoc documentation

Such that you would import these classes:


And use the parameters from your server connection to populate the parameters in your request:

httpPost(java.lang.String urlstr, Headers headers, Parameters params, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias, java.lang.String protocol)

Additional server connection details classes are also available for LDAP,

var svr1 = ServerConnectionFactory.getLdapConnectionByName(servername);

Which becomes relevant for the new UserHelper classes also introduced in for LDAP registry direct commands from mapping rules.




Comments are closed.

Website Built with

Up ↑

%d bloggers like this: