Configuration and Import/Export of Global Servers for Gadgets

Whenever a gadget application is created and deployed to the MWS, server settings values of the gadget is set by default as per host machine environment.

Whenever host is changed or custom host name alias is specified these settings may cause ambiguity especially when gadgets depend on CORS settings to invoke services. In order to eliminate this, Business Console allows configuring global servers for gadgets, so that all gadgets can have uniform server setting values.

Below are the steps that detail configuring global servers for gadgets,

Configuration of global servers for gadgets

1. Login to MWS http://<host>:<port> as sysadmin/manage,Navigate to “Folders> > Administrative Folders > Administration Dashboard > Configuration > CAF Application Runtime Configuration”

2. Click “Configure Global Defaults” and open “Environment Entries” under web application.

3. Click Add New Entry and for each server below four entries need to be added,

a. Name: gadgets.config.servers.host1.serverType

b. Type: String

c. Value: [Value Could be any server as in MWS, IS or AA]

 

a. Name: gadgets.config.servers.host1.host

b. Type: String

c. Value: [Name of the host in which server is present]

 

a. Name: gadgets.config.servers.host1.port

b. Type: Integer

c. Value: [Server port]

 

a. Name: gadgets.config.servers.host1.protocol

b. Type: String

c. Value: [Protocol as in http or https]

Example of configured global servers for gadgets

 

Exporting global servers for gadgets as part of Environmental entries

1. When gadgets, appspaces are exported if one want to keep the same global server values for gadgets, it can be exported from the designer in the form of xmlImport.

2. In the Designer, go to “UI Development perspective”, click on “MWS Admin” tab, provide credentials as sysadmin/manage. Navigate to “http://localhost:8585 > CAF Runtime Configurations >  __global__”, right click and select “Extract Asset into Project”, choose New/Existing project and Click Finish. xmlImport.xml can be found under the project “WebContent > WEB-INF > assets > configs > __global__”. Copy it some place

 

Importing global servers for gadgets as part of Environmental entries

1. If target environment needs same configuration, just Copy paste this xmlImport.xml into <installDir>:\MWS\server\default\deploy

If configuration needs to be changed one can edit xmlImport.xml with needed values, or once it is deployed it can be changed in MWS as explained in step1 and step2 of “Configuration of global servers for gadgets”