System Configuration data in web service configuration¶
Setting defined in the System Configuration can be used in the web service configuration. There are two ways to use them. One possibility is to use the values in certain settings like the transport setting etc.
It is now possible to use smart tags of type CONFIG in the web service cnfiguration. These tags contain values from system configurations. This allows it easier to handle passwords outside of the webservice configuration.
In addition to the network transport configuration, this is also possible directly in XSLT. It can also be used for user names and passwords, but also for default values such as queues, stats, etc.
<?xml version="1.0" encoding="UTF-8"?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date"> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:template match="RootElement"> <xsl:copy> <User><OTRS_CONFIG_Webservice::User></User> <Password><OTRS_CONFIG_Webservice::Password></Password> </xsl:copy> </xsl:template> </xsl:transform>
This feature is used with the Mattermost example to have the system configuration ProductName in the mapping available.
Keep often used settings like usernames, passwords, hostname, etc in the system configuration and share web service configurations between staging systems.
Why? E.g. to change credentials used in multiple web services by modifying a single setting.