Configure HTTP transports using wsadmin
Using Jacl
set xserver [$AdminConfig getid /Cell:cell/Node:node/Server:server/] set wc [$AdminConfig list WebContainer $xserver] set xtransAttr[$AdminConfig showAttribute $wc transports] set xtransports [lindex $xtransAttr0] set xtransport [lindex $xtransports 0] $AdminConfig modify $xtransport {{address \ { \ {host {hostname}} \ {port port} \ } \ }} $AdminConfig save
Using Jython
### Identify the appserver and assign it to the xserver variable. xserver = AdminConfig.getid('/Cell:cell/Node:node/Server:server/') print xserver ### Identify the Web container belonging to the server ### and assign it to the wc variable. wc = AdminConfig.list('WebContainer', xserver) print wc ### List all the transports belonging to the Web container ### and assign to the xtransports variable. xtransAttr= AdminConfig.showAttribute(wc, 'transports') # eliminate the beginning "[" and the end "]" cleanTransAttr = transportsAttr[1:len(transportsAttr)-1] xtransports = cleanTransAttr.split(" ")[0] ### Identify the transport to be modified and assign it to the transport variable. xtransports = cleanTransAttr[0] ### Modify the address attribute to change the host and port. AdminConfig.modify(transport, [['address', [['host', 'myHost'], ['port', 9081]]]]) AdminConfig.save()